Author: jimtabor
Date: Sat Jul 30 12:32:28 2016
New Revision: 72054
URL:
http://svn.reactos.org/svn/reactos?rev=72054&view=rev
Log:
[NtUser]
- Fix hang while inputting mouse message. Fix CORE-9998.
Modified:
trunk/reactos/win32ss/user/ntuser/msgqueue.c
Modified: trunk/reactos/win32ss/user/ntuser/msgqueue.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/user/ntuser/msgque…
==============================================================================
--- trunk/reactos/win32ss/user/ntuser/msgqueue.c [iso-8859-1] (original)
+++ trunk/reactos/win32ss/user/ntuser/msgqueue.c [iso-8859-1] Sat Jul 30 12:32:28 2016
@@ -1891,6 +1891,16 @@
return 1;
}
+/* check whether message is in the range of mouse messages */
+static inline BOOL is_mouse_message( UINT message )
+{
+ return ( //( message >= WM_NCMOUSEFIRST && message <= WM_NCMOUSELAST )
|| This seems to break tests...
+ ( message >= WM_MOUSEFIRST && message <= WM_MOUSELAST )
||
+ ( message >= WM_XBUTTONDOWN && message <= WM_XBUTTONDBLCLK )
||
+ ( message >= WM_MBUTTONDOWN && message <= WM_MBUTTONDBLCLK )
||
+ ( message >= WM_LBUTTONDOWN && message <= WM_RBUTTONDBLCLK )
);
+}
+
BOOL APIENTRY
co_MsqPeekHardwareMessage(IN PTHREADINFO pti,
IN BOOL Remove,
@@ -1946,7 +1956,7 @@
if ( ( !Window || // 1
( Window == PWND_BOTTOM && CurrentMessage->Msg.hwnd == NULL ) ||
// 2
( Window != PWND_BOTTOM && Window->head.h ==
CurrentMessage->Msg.hwnd ) || // 3
- ( CurrentMessage->Msg.message == WM_MOUSEMOVE ) ) && // Null
window for mouse moves.
+ ( is_mouse_message(CurrentMessage->Msg.message) ) ) && // Null
window for anything mouse.
( ( ( MsgFilterLow == 0 && MsgFilterHigh == 0 ) &&
CurrentMessage->QS_Flags & QSflags ) ||
( MsgFilterLow <= CurrentMessage->Msg.message &&
MsgFilterHigh >= CurrentMessage->Msg.message ) ) )
{