[ros-diffs] [weiden] 30609: Optimize GetDesktopWindow() to read the information from the shared heap
weiden at svn.reactos.org
weiden at svn.reactos.org
Wed Nov 21 00:15:49 CET 2007
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/window.c?rev=30609&r1=30608&r2=30609&view=diff
==============================================================================
--- 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);
}
More information about the Ros-diffs
mailing list