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:
Alexandre Julliard 2006-04-07 20:26:47 +02:00
parent ddd0e03e91
commit 2eb46bb464
2 changed files with 5 additions and 1 deletions

View File

@ -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 ) );

View File

@ -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) */