- Timestamp:
- Feb 15, 2001, 1:33:01 AM (25 years ago)
- Location:
- trunk/src/user32
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/user32/oslibmsg.cpp
r4848 r5137 1 /* $Id: oslibmsg.cpp,v 1.3 5 2000-12-29 18:39:58sandervl Exp $ */1 /* $Id: oslibmsg.cpp,v 1.36 2001-02-15 00:33:01 sandervl Exp $ */ 2 2 /* 3 3 * Window message translation functions for OS/2 … … 457 457 } 458 458 //****************************************************************************** 459 //Direct posting of messages that must remain invisible to the win32 app 460 //****************************************************************************** 461 BOOL OSLibPostMessageDirect(HWND hwnd, ULONG msg, ULONG wParam, ULONG lParam) 462 { 463 return WinPostMsg(hwnd, msg, (MPARAM)wParam, (MPARAM)lParam); 464 } 465 //****************************************************************************** 459 466 BOOL _System _O32_PostThreadMessage( DWORD, UINT, WPARAM, LPARAM ); 460 467 -
trunk/src/user32/oslibmsg.h
r3525 r5137 1 /* $Id: oslibmsg.h,v 1.1 3 2000-05-12 18:09:40sandervl Exp $ */1 /* $Id: oslibmsg.h,v 1.14 2001-02-15 00:33:01 sandervl Exp $ */ 2 2 /* 3 3 * Window message translation functions for OS/2 … … 44 44 ULONG OSLibSendMessage(HWND hwnd, ULONG msg, ULONG wParam, ULONG lParam, BOOL fUnicode); 45 45 ULONG OSLibWinBroadcastMsg(ULONG msg, ULONG wParam, ULONG lParam, BOOL fSend); 46 47 //Direct posting of messages that must remain invisible to the win32 app 48 BOOL OSLibPostMessageDirect(HWND hwnd, ULONG msg, ULONG wParam, ULONG lParam); 46 49 47 50 #define WINWM_NULL 0x0000 -
trunk/src/user32/pmwindow.cpp
r4945 r5137 1 /* $Id: pmwindow.cpp,v 1.11 2 2001-01-14 17:15:46sandervl Exp $ */1 /* $Id: pmwindow.cpp,v 1.113 2001-02-15 00:33:01 sandervl Exp $ */ 2 2 /* 3 3 * Win32 Window Managment Code for OS/2 … … 21 21 #include <string.h> 22 22 #include <win32type.h> 23 #include <win32api.h> 23 24 #include <winconst.h> 24 25 #include <winuser32.h> … … 219 220 } 220 221 } 222 else 223 if(msg == WIN32APP_SETFOCUSMSG) { 224 //PM doesn't allow SetFocus calls during WM_SETFOCUS message processing; 225 //must delay this function call 226 //mp1 = win32 window handle 227 //mp2 = activate flag 228 dprintf(("USER32: Delayed SetFocus %x call!", mp1)); 229 teb->o.odin.hwndFocus = 0; 230 WinFocusChange(HWND_DESKTOP, hwnd, mp2 ? FC_NOLOSEACTIVE : 0); 231 } 221 232 222 233 switch( msg ) … … 282 293 if (win32wnd->IsModalDialogOwner()) 283 294 { 295 dprintf(("win32wnd->IsModalDialogOwner %x", win32wnd->getWindowHandle())); 284 296 pswp->fl |= SWP_ZORDER; 285 297 pswp->hwndInsertBehind = win32wnd->getOS2HwndModalDialog(); … … 584 596 { 585 597 HWND hwndFocus = (HWND)mp1; 586 598 587 599 dprintf(("OS2: WM_SETFOCUS %x %x (%x) %d", win32wnd->getWindowHandle(), mp1, OS2ToWin32Handle(hwndFocus), mp2)); 600 601 //PM doesn't allow SetFocus calls during WM_SETFOCUS message processing; 602 //must delay this function call 603 604 teb->o.odin.fWM_SETFOCUS = TRUE; 605 teb->o.odin.hwndFocus = 0; 588 606 if(WinQueryWindowULong(hwndFocus, OFFSET_WIN32PM_MAGIC) != WIN32PM_MAGIC) { 589 607 //another (non-win32) application's window … … 597 615 } 598 616 else win32wnd->MsgKillFocus(OS2ToWin32Handle(hwndFocus)); 617 teb->o.odin.fWM_SETFOCUS = FALSE; 618 599 619 break; 600 620 } … … 1200 1220 } 1201 1221 else { 1202 WinSetWindowPos(win32wnd->getOS2WindowHandle(), 1203 0, track.rclTrack.xLeft, track.rclTrack.yBottom, 1204 track.rclTrack.xRight - track.rclTrack.xLeft, 1205 track.rclTrack.yTop - track.rclTrack.yBottom, 1206 SWP_SIZE|SWP_MOVE); 1222 SetWindowPos(win32wnd->getWindowHandle(), 0, track.rclTrack.xLeft, 1223 parentHeight - track.rclTrack.yTop, 1224 track.rclTrack.xRight - track.rclTrack.xLeft, 1225 track.rclTrack.yTop - track.rclTrack.yBottom, 1226 SWP_NOACTIVATE_W | SWP_NOZORDER_W | SWP_NOACTIVATE_W); 1227 // WinSetWindowPos(win32wnd->getOS2WindowHandle(), 1228 // 0, track.rclTrack.xLeft, track.rclTrack.yBottom, 1229 // track.rclTrack.xRight - track.rclTrack.xLeft, 1230 // track.rclTrack.yTop - track.rclTrack.yBottom, 1231 // SWP_SIZE|SWP_MOVE); 1207 1232 } 1208 1233 } -
trunk/src/user32/win32wbase.h
r4925 r5137 1 /* $Id: win32wbase.h,v 1.10 3 2001-01-10 20:39:15sandervl Exp $ */1 /* $Id: win32wbase.h,v 1.104 2001-02-15 00:33:01 sandervl Exp $ */ 2 2 /* 3 3 * Win32 Window Base Class for OS/2 … … 49 49 #define OPEN32_MSGDIFF 0xC00 50 50 #define WIN32APP_POSTMSG (0x1000+OPEN32_MSGDIFF) 51 52 //PM doesn't allow SetFocus during WM_SETFOCUS message processing; must delay 53 //this by posting a message 54 #define WIN32APP_SETFOCUSMSG (0x1001+OPEN32_MSGDIFF) 51 55 52 56 #define WIN32MSG_MAGICA 0x12345678 -
trunk/src/user32/window.cpp
r5060 r5137 1 /* $Id: window.cpp,v 1.8 7 2001-02-03 18:52:02sandervl Exp $ */1 /* $Id: window.cpp,v 1.88 2001-02-15 00:33:01 sandervl Exp $ */ 2 2 /* 3 3 * Win32 window apis for OS/2 … … 34 34 #include "user32.h" 35 35 #include "winicon.h" 36 #include "oslibmsg.h" 36 37 #include <win\winpos.h> 37 38 #include <win\win.h> … … 668 669 HWND WIN32API SetFocus (HWND hwnd) 669 670 { 670 HWND lastFocus, lastFocus_W, hwnd_O; 671 BOOL activate; 671 HWND lastFocus, lastFocus_W, hwnd_O; 672 BOOL activate; 673 TEB *teb; 674 675 teb = GetThreadTEB(); 676 if(teb == NULL) { 677 DebugInt3(); 678 return 0; 679 } 672 680 673 681 hwnd_O = Win32ToOS2Handle (hwnd); … … 678 686 dprintf(("SetFocus %x (%x) -> %x (%x)\n", lastFocus_W, lastFocus, hwnd, hwnd_O)); 679 687 688 //PM doesn't allow SetFocus calls during WM_SETFOCUS message processing; 689 //must delay this function call 690 if(teb->o.odin.fWM_SETFOCUS) { 691 dprintf(("USER32: Delay SetFocus call!")); 692 teb->o.odin.hwndFocus = hwnd; 693 //mp1 = win32 window handle 694 //mp2 = activate flag 695 OSLibPostMessageDirect(hwnd_O, WIN32APP_SETFOCUSMSG, hwnd, activate); 696 return lastFocus_W; 697 } 680 698 return (OSLibWinSetFocus (OSLIB_HWND_DESKTOP, hwnd_O, activate)) ? lastFocus_W : 0; 681 699 } … … 684 702 HWND WIN32API GetFocus(void) 685 703 { 686 HWND hwnd; 704 TEB *teb; 705 HWND hwnd; 706 707 teb = GetThreadTEB(); 708 if(teb == NULL) { 709 DebugInt3(); 710 return 0; 711 } 712 //PM doesn't allow SetFocus calls during WM_SETFOCUS message processing; 713 //If focus was changed during WM_SETFOCUS, the focus window handle is 714 //stored in teb->o.odin.hwndFocus (set back to 0 when delayed SetFocus 715 //is activated) 716 if(teb->o.odin.hwndFocus) { 717 dprintf(("USER32: GetFocus %x (DURING WM_SETFOCUS PROCESSING)", teb->o.odin.hwndFocus)); 718 return teb->o.odin.hwndFocus; 719 } 687 720 688 721 hwnd = OSLibWinQueryFocus(OSLIB_HWND_DESKTOP);
Note:
See TracChangeset
for help on using the changeset viewer.