user32: Don't start explorer.exe on non-visible window stations.
This commit is contained in:
parent
bd2ee68d6d
commit
bd09340cf2
|
@ -1619,6 +1619,10 @@ HWND WINAPI GetDesktopWindow(void)
|
|||
SERVER_END_REQ;
|
||||
|
||||
if (!thread_info->desktop)
|
||||
{
|
||||
USEROBJECTFLAGS flags;
|
||||
if (!GetUserObjectInformationW( GetProcessWindowStation(), UOI_FLAGS, &flags,
|
||||
sizeof(flags), NULL ) || (flags.dwFlags & WSF_VISIBLE))
|
||||
{
|
||||
static const WCHAR command_line[] = {'\\','e','x','p','l','o','r','e','r','.','e','x','e',' ','/','d','e','s','k','t','o','p',0};
|
||||
STARTUPINFOW si;
|
||||
|
@ -1641,9 +1645,10 @@ HWND WINAPI GetDesktopWindow(void)
|
|||
WaitForInputIdle( pi.hProcess, 10000 );
|
||||
CloseHandle( pi.hThread );
|
||||
CloseHandle( pi.hProcess );
|
||||
|
||||
}
|
||||
else WARN( "failed to start explorer, err %d\n", GetLastError() );
|
||||
}
|
||||
else TRACE( "not starting explorer since winstation is not visible\n" );
|
||||
|
||||
SERVER_START_REQ( get_desktop_window )
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue