Author: mjmartin
Date: Fri Apr 30 13:23:17 2010
New Revision: 47065
URL:
http://svn.reactos.org/svn/reactos?rev=47065&view=rev
Log:
[win32k]
- When calling NtUserCallNextHookEx check that the current hook is not the first in the
chain. If so don't call the hook proc and just return, as it has already been called
and it makes no sense for the NextHook function to call the first hook proc. Fixes bugs
#4461 and #4407.
- The previous commit claiming to fix bug #4461 was incorrect, it may have actually fixed
bug #5320. Testers please test.
Modified:
trunk/reactos/subsystems/win32/win32k/ntuser/hook.c
Modified: trunk/reactos/subsystems/win32/win32k/ntuser/hook.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/nt…
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/ntuser/hook.c [iso-8859-1] (original)
+++ trunk/reactos/subsystems/win32/win32k/ntuser/hook.c [iso-8859-1] Fri Apr 30 13:23:17
2010
@@ -1050,6 +1050,12 @@
if (!HookObj) RETURN( 0);
+ /* Check that the first hook in the chain is not this hook */
+ NextObj = IntGetFirstHook(IntGetTable(HookObj), HookObj->HookId);
+
+ /* Its the same so it has already been called */
+ if (HookObj == NextObj) RETURN(0);
+
UserReferenceObject(HookObj);
Ansi = HookObj->Ansi;