Author: jimtabor
Date: Tue May 19 19:47:16 2009
New Revision: 40981
URL:
http://svn.reactos.org/svn/reactos?rev=40981&view=rev
Log:
- Cleanup Real/GetInputState.
Modified:
trunk/reactos/dll/win32/user32/windows/message.c
trunk/reactos/include/reactos/win32k/ntuser.h
trunk/reactos/subsystems/win32/win32k/ntuser/misc.c
trunk/reactos/subsystems/win32/win32k/ntuser/simplecall.c
Modified: trunk/reactos/dll/win32/user32/windows/message.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/user32/windows/m…
==============================================================================
--- trunk/reactos/dll/win32/user32/windows/message.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/user32/windows/message.c [iso-8859-1] Tue May 19 19:47:16
2009
@@ -2198,51 +2198,27 @@
/*
- * @unimplemented
+ * @implemented
*/
DWORD
WINAPI
RealGetQueueStatus(UINT flags)
{
- DWORD ret;
- WORD changed_bits, wake_bits;
-
-#if 0 /* wine stuff. don't know what it does... */
-
- /* check for pending X events */
- if (USER_Driver.pMsgWaitForMultipleObjectsEx)
- USER_Driver.pMsgWaitForMultipleObjectsEx( 0, NULL, 0, 0, 0 );
-#endif
-
- ret = NtUserCallOneParam(TRUE, ONEPARAM_ROUTINE_GETQUEUESTATUS);
-
- changed_bits = LOWORD(ret);
- wake_bits = HIWORD(ret);
-
- return MAKELONG(changed_bits & flags, wake_bits & flags);
-}
-
-
-/*
- * @unimplemented
+ return NtUserCallOneParam(flags, ONEPARAM_ROUTINE_GETQUEUESTATUS);
+}
+
+
+/*
+ * @implemented
*/
BOOL WINAPI GetInputState(VOID)
{
- DWORD ret;
- WORD wake_bits;
-
-#if 0 /* wine stuff. don't know what it does... */
-
- /* check for pending X events */
- if (USER_Driver.pMsgWaitForMultipleObjectsEx)
- USER_Driver.pMsgWaitForMultipleObjectsEx( 0, NULL, 0, 0, 0 );
-#endif
-
- ret = NtUserCallOneParam(FALSE, ONEPARAM_ROUTINE_GETQUEUESTATUS);
-
- wake_bits = HIWORD(ret);
-
- return wake_bits & (QS_KEY | QS_MOUSEBUTTON);
+ PCLIENTTHREADINFO pcti = GetWin32ClientInfo()->pClientThreadInfo;
+
+ if ((!pcti) || (pcti->fsChangeBits & (QS_KEY|QS_MOUSEBUTTON)))
+ return (BOOL)NtUserGetThreadState(THREADSTATE_GETINPUTSTATE);
+
+ return FALSE;
}
Modified: trunk/reactos/include/reactos/win32k/ntuser.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/reactos/win32k/ntu…
==============================================================================
--- trunk/reactos/include/reactos/win32k/ntuser.h [iso-8859-1] (original)
+++ trunk/reactos/include/reactos/win32k/ntuser.h [iso-8859-1] Tue May 19 19:47:16 2009
@@ -1718,7 +1718,8 @@
THREADSTATE_CAPTUREWINDOW,
THREADSTATE_PROGMANWINDOW,
THREADSTATE_TASKMANWINDOW,
- THREADSTATE_GETMESSAGETIME
+ THREADSTATE_GETMESSAGETIME,
+ THREADSTATE_GETINPUTSTATE
};
DWORD
Modified: trunk/reactos/subsystems/win32/win32k/ntuser/misc.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/nt…
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/ntuser/misc.c [iso-8859-1] (original)
+++ trunk/reactos/subsystems/win32/win32k/ntuser/misc.c [iso-8859-1] Tue May 19 19:47:16
2009
@@ -118,6 +118,9 @@
case THREADSTATE_GETMESSAGETIME:
/* FIXME Needs more work! */
RETURN( ((PTHREADINFO)PsGetCurrentThreadWin32Thread())->timeLast);
+
+ case THREADSTATE_GETINPUTSTATE:
+ RETURN( HIWORD(IntGetQueueStatus(FALSE)) & (QS_KEY | QS_MOUSEBUTTON));
}
RETURN( 0);
Modified: trunk/reactos/subsystems/win32/win32k/ntuser/simplecall.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/nt…
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/ntuser/simplecall.c [iso-8859-1] (original)
+++ trunk/reactos/subsystems/win32/win32k/ntuser/simplecall.c [iso-8859-1] Tue May 19
19:47:16 2009
@@ -397,8 +397,14 @@
RETURN (UserRealizePalette((HDC) Param));
case ONEPARAM_ROUTINE_GETQUEUESTATUS:
- RETURN (IntGetQueueStatus((BOOL) Param));
-
+ {
+ DWORD Ret;
+ WORD changed_bits, wake_bits;
+ Ret = IntGetQueueStatus(FALSE);
+ changed_bits = LOWORD(Ret);
+ wake_bits = HIWORD(Ret);
+ RETURN( MAKELONG(changed_bits & Param, wake_bits & Param));
+ }
case ONEPARAM_ROUTINE_ENUMCLIPBOARDFORMATS:
/* FIXME: Should use UserEnterShared */
RETURN(IntEnumClipboardFormats(Param));