Author: weiden Date: Wed Nov 21 02:15:49 2007 New Revision: 30609
URL: http://svn.reactos.org/svn/reactos?rev=30609&view=rev Log: Optimize GetDesktopWindow() to read the information from the shared heap
Modified: trunk/reactos/dll/win32/user32/windows/window.c
Modified: trunk/reactos/dll/win32/user32/windows/window.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/user32/windows/wi... ============================================================================== --- trunk/reactos/dll/win32/user32/windows/window.c (original) +++ trunk/reactos/dll/win32/user32/windows/window.c Wed Nov 21 02:15:49 2007 @@ -529,7 +529,22 @@ HWND STDCALL GetDesktopWindow(VOID) { - return NtUserGetDesktopWindow(); + PWINDOW Wnd; + HWND Ret = NULL; + + _SEH_TRY + { + Wnd = GetThreadDesktopWnd(); + if (Wnd != NULL) + Ret = UserHMGetHandle(Wnd); + } + _SEH_HANDLE + { + /* Do nothing */ + } + _SEH_END; + + return Ret; }
@@ -1096,7 +1111,7 @@ */ BOOL STDCALL GetWindowPlacement(HWND hWnd, - WINDOWPLACEMENT *lpwndpl) + WINDOWPLACEMENT *lpwndpl) { return (BOOL)NtUserGetWindowPlacement(hWnd, lpwndpl); }