Commit 03f645a7 authored by Piotr Caban's avatar Piotr Caban Committed by Alexandre Julliard

server: Filter WM_QUIT message in PeekMessage call if PM_QS_POSTMESSAGE was not specified.

parent 21d470d1
......@@ -10500,6 +10500,10 @@ static void test_quit_message(void)
flush_events();
PostQuitMessage(0xbeef);
msg.message = 0;
ret = PeekMessageA(&msg, 0, 0, 0, PM_QS_SENDMESSAGE);
ok(!ret, "got %x message\n", msg.message);
ret = PeekMessageA(&msg, NULL, 0, 0, PM_NOREMOVE);
ok(ret, "PeekMessage failed with error %d\n", GetLastError());
ok(msg.message == WM_QUIT, "Received message 0x%04x instead of WM_QUIT\n", msg.message);
......
......@@ -2384,9 +2384,8 @@ DECL_HANDLER(get_message)
get_posted_message( queue, get_win, WM_HOTKEY, WM_HOTKEY, req->flags, reply ))
return;
/* only check for quit messages if not posted messages pending.
* note: the quit message isn't filtered */
if (get_quit_message( queue, req->flags, reply ))
/* only check for quit messages if not posted messages pending */
if ((filter & QS_POSTMESSAGE) && get_quit_message( queue, req->flags, reply ))
return;
/* then check for any raw hardware message */
......
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