Changeset 21916 for trunk/src/user32/window.cpp
- Timestamp:
- Dec 18, 2011, 10:28:22 PM (14 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk
- Property svn:ignore
-
old new 1 bin 2 Makefile.inc 1 env.cmd 2 LocalConfig.kmk
-
-
Property svn:mergeinfo
set to
/branches/gcc-kmk merged eligible
- Property svn:ignore
-
trunk/src/user32/window.cpp
r21347 r21916 29 29 #include <string.h> 30 30 #include <stdio.h> 31 #include <win32wbase.h>32 #include <win32wmdiclient.h>33 #include <win32wdesktop.h>31 #include "win32wbase.h" 32 #include "win32wmdiclient.h" 33 #include "win32wdesktop.h" 34 34 #include "win32dlg.h" 35 #include <oslibwin.h>36 #include <oslibgdi.h>35 #include "oslibwin.h" 36 #include "oslibgdi.h" 37 37 #include "user32.h" 38 38 #include "winicon.h" 39 39 #include "pmwindow.h" 40 40 #include "oslibmsg.h" 41 #include <win \winpos.h>42 #include <win \win.h>41 #include <win/winpos.h> 42 #include <win/win.h> 43 43 #include <heapstring.h> 44 44 #include <winuser32.h> … … 52 52 ODINDEBUGCHANNEL(USER32-WINDOW) 53 53 54 #ifdef __cplusplus 55 extern "C" { 56 #endif 54 57 55 58 //****************************************************************************** … … 117 120 else dprintf(("CreateWindowExA: window %s class %d parent %x (%d,%d) (%d,%d), %x %x menu=%x", windowName, className, parent, x, y, width, height, style, exStyle, menu)); 118 121 119 if(!str cmpi(className, MDICLIENTCLASSNAMEA)) {122 if(!stricmp(className, MDICLIENTCLASSNAMEA)) { 120 123 window = (Win32BaseWindow *) new Win32MDIClientWindow(&cs, classAtom, FALSE); 121 124 } 122 125 else 123 if(!str cmpi((char *) className, DIALOG_CLASS_NAMEA))126 if(!stricmp((char *) className, DIALOG_CLASS_NAMEA)) 124 127 { 125 128 DLG_TEMPLATE dlgTemplate = {0}; … … 155 158 } 156 159 HWND hwnd = window->getWindowHandle(); 157 160 158 161 // set myself as last active popup / window 159 162 window->setLastActive( hwnd ); 160 163 161 164 RELEASE_WNDOBJ(window); 162 165 return hwnd; … … 262 265 } 263 266 HWND hwnd = window->getWindowHandle(); 264 267 265 268 // set myself as last active popup / window 266 269 window->setLastActive( hwnd ); 267 270 268 271 RELEASE_WNDOBJ(window); 269 272 return hwnd; … … 300 303 } 301 304 hwndActive = window->SetActiveWindow(); 302 305 303 306 // check last active popup window 304 307 if (hwndActive) … … 308 311 dprintf(("support for last active popup incorrectly implemented")); 309 312 } 310 313 311 314 RELEASE_WNDOBJ(window); 312 315 return hwndActive; … … 561 564 if ((nCmdShow == SW_RESTORE) && (window->getStyle() & WS_MINIMIZE) && fOS2Look ) 562 565 { 563 dprintf(("ShowWindow: Initiating OS/2 PM restore")); 566 dprintf(("ShowWindow: Initiating OS/2 PM restore")); 564 567 ret = OSLibWinRestoreWindow(window->getOS2FrameWindowHandle()); 565 568 } 566 else 569 else 567 570 ret = window->ShowWindow(nCmdShow); 568 571 RELEASE_WNDOBJ(window); … … 720 723 ret = TRUE; 721 724 722 if(dwStyle & WS_CHILD) 725 if(dwStyle & WS_CHILD) 723 726 { 724 727 //check visibility of parents … … 762 765 //else no child -> no parent (GetParent returns owner otherwise!) 763 766 } 764 else 765 if (type == GA_ROOT) 767 else 768 if (type == GA_ROOT) 766 769 { 767 770 hwndAncestor = window->GetTopParent(); 768 771 } 769 772 else 770 if (type == GA_ROOTOWNER) 771 { 772 if(hwnd != GetDesktopWindow()) 773 if (type == GA_ROOTOWNER) 774 { 775 if(hwnd != GetDesktopWindow()) 773 776 { 774 777 hwndAncestor = hwnd; … … 804 807 TEB *teb; 805 808 806 dprintf(("SetFocus %x", hwnd)); 809 dprintf(("SetFocus %x", hwnd)); 807 810 teb = GetThreadTEB(); 808 811 if(teb == NULL) { … … 929 932 lpThreadInfo->hwndActive = GetActiveWindow(); 930 933 if(lpThreadInfo->hwndActive) { 931 if(dwThreadId != GetWindowThreadProcessId(lpThreadInfo->hwndActive, NULL)) 934 if(dwThreadId != GetWindowThreadProcessId(lpThreadInfo->hwndActive, NULL)) 932 935 {//this thread doesn't own the active window (TODO: correct??) 933 936 lpThreadInfo->hwndActive = 0; … … 980 983 windowDesktop->addRef(); 981 984 window = windowDesktop; 982 } 985 } 983 986 else window = Win32BaseWindow::GetWindowFromHandle(hwnd); 984 987 985 988 if(!window) { 986 989 dprintf(("GetWindowRect, window %x not found", hwnd)); … … 1104 1107 * InternalGetWindowText (USER32.326) 1105 1108 */ 1106 int WIN32API InternalGetWindowText(HWND hwnd, 1109 int WIN32API InternalGetWindowText(HWND hwnd, 1107 1110 LPWSTR lpString, 1108 1111 INT nMaxCount ) … … 1274 1277 windowDesktop->addRef(); 1275 1278 wndfrom = windowDesktop; 1276 } 1279 } 1277 1280 else { 1278 1281 wndfrom = Win32BaseWindow::GetWindowFromHandle(hwndFrom); … … 1288 1291 windowDesktop->addRef(); 1289 1292 wndto = windowDesktop; 1290 } 1293 } 1291 1294 else { 1292 1295 wndto = Win32BaseWindow::GetWindowFromHandle(hwndTo); … … 1887 1890 { 1888 1891 // WND *wndPtr = WIN_FindWndPtr(hwndChild); 1889 1892 1890 1893 // WINPOS_ShowIconTitle( wndPtr, FALSE ); 1891 1894 1892 1895 SetWindowPos( hwndChild, 0, x + (xspacing - GetSystemMetrics(SM_CXICON)) / 2, 1893 1896 y - yspacing - GetSystemMetrics(SM_CYICON)/2, 0, 0, … … 2003 2006 2004 2007 owner = Win32BaseWindow::GetWindowFromHandle(hWnd); 2005 if(!owner) 2008 if(!owner) 2006 2009 { 2007 2010 dprintf(("GetLastActivePopup, window %x not found", hWnd)); … … 2013 2016 if (!IsWindow( hwndRetVal )) 2014 2017 hwndRetVal = owner->getWindowHandle(); 2015 2018 2016 2019 RELEASE_WNDOBJ(owner); 2017 2020 2018 2021 return hwndRetVal; 2019 2022 } … … 2036 2039 } 2037 2040 RELEASE_WNDOBJ(window); 2038 2041 2039 2042 return dwThreadId; 2040 2043 } … … 2220 2223 } 2221 2224 //****************************************************************************** 2222 //The GetWindowModuleFileName function retrieves the full path and file name of 2225 //The GetWindowModuleFileName function retrieves the full path and file name of 2223 2226 //the module associated with the specified window handle. 2224 2227 //****************************************************************************** … … 2262 2265 return (FALSE); 2263 2266 } 2267 2268 #ifdef __cplusplus 2269 } // extern "C" 2270 #endif
Note:
See TracChangeset
for help on using the changeset viewer.