[win32csr]

- When we close a window during shutdown, switch to the desktop of the window 
CORE-5439

svn path=/trunk/; revision=58513
This commit is contained in:
Giannis Adamopoulos 2013-03-16 09:09:53 +00:00
parent d90981b030
commit aa4c4bda1e

View file

@ -61,6 +61,7 @@ typedef struct tagNOTIFY_CONTEXT
WPARAM wParam;
LPARAM lParam;
HDESK Desktop;
HDESK OldDesktop;
DWORD StartTime;
DWORD QueryResult;
HWND Dlg;
@ -412,8 +413,13 @@ NotifyDesktopEnum(LPWSTR DesktopName, LPARAM lParam)
return FALSE;
}
Context->OldDesktop = GetThreadDesktop(GetCurrentThreadId());
SwitchDesktop(Context->Desktop);
EnumDesktopWindows(Context->Desktop, NotifyTopLevelEnum, lParam);
SwitchDesktop(Context->OldDesktop);
CloseDesktop(Context->Desktop);
return QUERY_RESULT_CONTINUE == Context->QueryResult;