Commit ff8f6e86 authored by Francois Gouget's avatar Francois Gouget Committed by Alexandre Julliard

user32: When destroying a window, preserve the first WM_QUIT message that was posted to it.

parent 30f2c661
......@@ -10241,7 +10241,7 @@ static void test_quit_message(void)
add_message(&rmsg);
DispatchMessage(&msg);
}
ok_sequence(WmStopQuitSeq, "WmStopQuitSeq", TRUE);
ok_sequence(WmStopQuitSeq, "WmStopQuitSeq", FALSE);
}
static const struct message WmMouseHoverSeq[] = {
......
......@@ -1918,7 +1918,15 @@ void queue_cleanup_window( struct thread *thread, user_handle_t win )
LIST_FOR_EACH_SAFE( ptr, next, &queue->msg_list[i] )
{
struct message *msg = LIST_ENTRY( ptr, struct message, entry );
if (msg->win == win) remove_queue_message( queue, msg, i );
if (msg->win == win)
{
if (msg->msg == WM_QUIT && !queue->quit_message)
{
queue->quit_message = 1;
queue->exit_code = msg->wparam;
}
remove_queue_message( queue, msg, i );
}
}
}
......
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