Commit 2eb46bb4 authored by Alexandre Julliard's avatar Alexandre Julliard

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.
parent ddd0e03e
......@@ -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 );
return 0;
case WM_CLOSE:
PostQuitMessage(0);
return 0;
case WM_SETCURSOR:
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 )
{
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) */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment