Author: gadamopoulos
Date: Sat Apr 2 10:12:44 2011
New Revision: 51224
URL:
http://svn.reactos.org/svn/reactos?rev=51224&view=rev
Log:
[win32k]
- Simplify co_IntWaitMessage
- In co_IntGetPeekMessage, call co_MsqWaitForNewMessages instead of co_IntWaitMessage when
we need to wait for a new message. co_IntWaitMessage calls co_IntPeekMessage again
without removing messages. The problem is that processing some messages produce other
messages or hooks even though the message must not be removed. As a result some messages
like WM_NCHITTEST were received twice by the application
- Should fix bug 3232
Modified:
trunk/reactos/subsystems/win32/win32k/ntuser/message.c
Modified: trunk/reactos/subsystems/win32/win32k/ntuser/message.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/nt…
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/ntuser/message.c [iso-8859-1] (original)
+++ trunk/reactos/subsystems/win32/win32k/ntuser/message.c [iso-8859-1] Sat Apr 2
10:12:44 2011
@@ -850,15 +850,15 @@
Window,
MsgFilterMin,
MsgFilterMax);
- }
- while ( (STATUS_WAIT_0 <= Status && Status <= STATUS_WAIT_63) ||
- STATUS_TIMEOUT == Status );
-
- if (!NT_SUCCESS(Status))
- {
- SetLastNtError(Status);
- DPRINT1("Exit co_IntWaitMessage on error!\n");
- }
+ if (!NT_SUCCESS(Status))
+ {
+ SetLastNtError(Status);
+ DPRINT1("Exit co_IntWaitMessage on error!\n");
+
+ return FALSE;
+ }
+ }
+ while ( TRUE );
return FALSE;
}
@@ -874,6 +874,7 @@
PWND Window;
PTHREADINFO pti;
BOOL Present = FALSE;
+ NTSTATUS Status;
if ( hWnd == HWND_TOPMOST || hWnd == HWND_BROADCAST )
hWnd = HWND_BOTTOM;
@@ -941,7 +942,11 @@
if ( bGMSG )
{
- if ( !co_IntWaitMessage(Window, MsgFilterMin, MsgFilterMax) )
+ Status = co_MsqWaitForNewMessages( pti->MessageQueue,
+ Window,
+ MsgFilterMin,
+ MsgFilterMax);
+ if ( !NT_SUCCESS(Status) )
{
Present = -1;
break;