From 374e21b4e07680d6d477bb2cd59858048e5bd539 Mon Sep 17 00:00:00 2001 From: James Tabor Date: Wed, 6 Apr 2011 12:23:54 +0000 Subject: [PATCH] [Win32k] - The Reak fix to unfocused explorer minimize hang, spotted by R3dDr4g0n . svn path=/trunk/; revision=51264 --- .../subsystems/win32/win32k/ntuser/msgqueue.c | 26 +++++-------------- .../subsystems/win32/win32k/ntuser/window.c | 2 +- 2 files changed, 7 insertions(+), 21 deletions(-) diff --git a/reactos/subsystems/win32/win32k/ntuser/msgqueue.c b/reactos/subsystems/win32/win32k/ntuser/msgqueue.c index db8ca7c97b8..6af6000137c 100644 --- a/reactos/subsystems/win32/win32k/ntuser/msgqueue.c +++ b/reactos/subsystems/win32/win32k/ntuser/msgqueue.c @@ -1353,28 +1353,14 @@ NTSTATUS FASTCALL co_MsqWaitForNewMessages(PUSER_MESSAGE_QUEUE MessageQueue, PWND WndFilter, UINT MsgFilterMin, UINT MsgFilterMax) { - PTHREADINFO pti; - NTSTATUS ret = STATUS_SUCCESS; - - pti = MessageQueue->Thread->Tcb.Win32Thread; - - while ( co_MsqDispatchOneSentMessage(MessageQueue) ); - - if (pti->pcti->fsWakeBits & pti->pcti->fsChangeBits ) - { - return ret; - } - - pti->pClientInfo->cSpins = 0; - IdlePing(); + NTSTATUS ret; UserLeaveCo(); - ret = KeWaitForSingleObject(MessageQueue->NewMessages, - Executive, - UserMode, - FALSE, - NULL); + ret = KeWaitForSingleObject( MessageQueue->NewMessages, + UserRequest, + UserMode, + FALSE, + NULL ); UserEnterCo(); - IdlePong(); return ret; } diff --git a/reactos/subsystems/win32/win32k/ntuser/window.c b/reactos/subsystems/win32/win32k/ntuser/window.c index 379edcd99f3..f07a5455517 100644 --- a/reactos/subsystems/win32/win32k/ntuser/window.c +++ b/reactos/subsystems/win32/win32k/ntuser/window.c @@ -1530,7 +1530,7 @@ static void IntSendParentNotify( PWND pWindow, UINT msg ) if (pWindow->spwndParent && pWindow->spwndParent != UserGetDesktopWindow()) { USER_REFERENCE_ENTRY Ref; - UserRefObjectCo(pWindow->spwndParent, &Ref); // Fix explorer minimize hang. + UserRefObjectCo(pWindow->spwndParent, &Ref); // Should be co_IntSendMessage please retest, Ref to Chg, revision 51254... co_IntSendMessageNoWait( pWindow->spwndParent->head.h, WM_PARENTNOTIFY,