Changeset 5137 for trunk/src/user32/window.cpp
- Timestamp:
- Feb 15, 2001, 1:33:01 AM (25 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
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.