Optimize GetDesktopWindow() to read the information from the shared heap

svn path=/trunk/; revision=30609
This commit is contained in:
Thomas Bluemel
2007-11-20 23:15:49 +00:00
parent 836f7e1954
commit bfc8890eee
+17 -2
View File
@@ -529,7 +529,22 @@ EndDeferWindowPos(HDWP hWinPosInfo)
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 @@ GetWindowModuleFileNameW(HWND hwnd,
*/
BOOL STDCALL
GetWindowPlacement(HWND hWnd,
WINDOWPLACEMENT *lpwndpl)
WINDOWPLACEMENT *lpwndpl)
{
return (BOOL)NtUserGetWindowPlacement(hWnd, lpwndpl);
}