Changeset 5696 for trunk/src/user32/window.cpp
- Timestamp:
- May 11, 2001, 10:40:40 PM (24 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/user32/window.cpp
r5685 r5696 1 /* $Id: window.cpp,v 1.9 5 2001-05-11 08:39:46sandervl Exp $ */1 /* $Id: window.cpp,v 1.96 2001-05-11 20:40:40 sandervl Exp $ */ 2 2 /* 3 3 * Win32 window apis for OS/2 … … 715 715 HWND WIN32API SetFocus(HWND hwnd) 716 716 { 717 Win32BaseWindow *window; 717 718 HWND lastFocus, lastFocus_W, hwnd_O; 718 719 BOOL activate; … … 725 726 } 726 727 727 hwnd_O = Win32ToOS2Handle (hwnd); 728 lastFocus = OSLibWinQueryFocus (OSLIB_HWND_DESKTOP); 728 window = Win32BaseWindow::GetWindowFromHandle(hwnd); 729 if(!window) { 730 dprintf(("SetFocus, window %x not found", hwnd)); 731 SetLastError(ERROR_INVALID_WINDOW_HANDLE); 732 return 0; 733 } 734 735 hwnd_O = window->getOS2FrameWindowHandle(); 736 if(teb->o.odin.hwndFocus) { 737 lastFocus = teb->o.odin.hwndFocus; 738 } 739 else lastFocus = OSLibWinQueryFocus (OSLIB_HWND_DESKTOP); 740 729 741 activate = ((hwnd_O == lastFocus) || OSLibWinIsChild (lastFocus, hwnd_O)); 730 742 lastFocus_W = OS2ToWin32Handle (lastFocus); … … 742 754 return lastFocus_W; 743 755 } 756 teb->o.odin.hwndFocus = 0; 744 757 return (OSLibWinSetFocus (OSLIB_HWND_DESKTOP, hwnd_O, activate)) ? lastFocus_W : 0; 745 758 }
Note:
See TracChangeset
for help on using the changeset viewer.