diff --git "a/win32ss/user/ntuser/msgqueue.c" "b/win32ss/user/ntuser/msgqueue.c" index bcec00196bc..2ed22d4035d 100644 --- "a/win32ss/user/ntuser/msgqueue.c" +++ "b/win32ss/user/ntuser/msgqueue.c" @@ -1509,6 +1509,14 @@ BOOL co_IntProcessMouseMessage(MSG* msg, BOOL* RemoveMessages, BOOL* NotForUs, L TRACE("Got mouse message for %p, hittest: 0x%x\n", msg->hwnd, hittest); + if (!msg->hwnd && + (hittest == HTCLOSE || hittest == HTMINBUTTON || hittest == HTMAXBUTTON)) + { + *NotForUs = FALSE; + *RemoveMessages = FALSE; + return FALSE; + } + // Null window or not the same "Hardware" message queue. if (pwndMsg == NULL || pwndMsg->head.pti->MessageQueue != MessageQueue) {