explorer: Don't use ExitWindows on shutdown.
ExitWindows kills all current processes and that creates a race with newly started processes. Instead, simply exit and let the new process create a new explorer.
This commit is contained in:
parent
ddd0e03e91
commit
2eb46bb464
|
@ -39,6 +39,10 @@ static LRESULT WINAPI desktop_wnd_proc( HWND hwnd, UINT message, WPARAM wp, LPAR
|
||||||
if ((wp & 0xfff0) == SC_CLOSE) ExitWindows( 0, 0 );
|
if ((wp & 0xfff0) == SC_CLOSE) ExitWindows( 0, 0 );
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
|
case WM_CLOSE:
|
||||||
|
PostQuitMessage(0);
|
||||||
|
return 0;
|
||||||
|
|
||||||
case WM_SETCURSOR:
|
case WM_SETCURSOR:
|
||||||
return (LRESULT)SetCursor( LoadCursorA( 0, (LPSTR)IDC_ARROW ) );
|
return (LRESULT)SetCursor( LoadCursorA( 0, (LPSTR)IDC_ARROW ) );
|
||||||
|
|
||||||
|
|
|
@ -363,7 +363,7 @@ struct process *get_top_window_owner( struct desktop *desktop )
|
||||||
void close_desktop_window( struct desktop *desktop )
|
void close_desktop_window( struct desktop *desktop )
|
||||||
{
|
{
|
||||||
struct window *win = desktop->top_window;
|
struct window *win = desktop->top_window;
|
||||||
if (win && win->thread) post_message( win->handle, WM_SYSCOMMAND, SC_CLOSE, 0 );
|
if (win && win->thread) post_message( win->handle, WM_CLOSE, 0, 0 );
|
||||||
}
|
}
|
||||||
|
|
||||||
/* create a new window structure (note: the window is not linked in the window tree) */
|
/* create a new window structure (note: the window is not linked in the window tree) */
|
||||||
|
|
Loading…
Reference in New Issue