win32u: Avoid calling WH_CBT HCBT_CLICKSKIPPED hooks recursively.
Previously, accept_hardware_message() is called after WH_CBT HCBT_CLICKSKIPPED hooks. So when these hooks call PeekMessage(), they will be called recursively. Note that WH_MOUSE hooks do get called recursively according to tests.
This commit is contained in:
parent
a676f094f6
commit
f110dc58ba
2 changed files with 1 additions and 2 deletions
|
@ -12629,7 +12629,6 @@ static void test_recursive_hook(void)
|
|||
flush_events();
|
||||
|
||||
/* Expect the WH_CBT HCBT_CLICKSKIPPED hook not gets called recursively */
|
||||
todo_wine
|
||||
ok(max_hook_depth <= 10, "Got expected %d.\n", max_hook_depth);
|
||||
|
||||
UnhookWindowsHookEx(cbt_hook);
|
||||
|
|
|
@ -2570,8 +2570,8 @@ static BOOL process_mouse_message( MSG *msg, UINT hw_id, ULONG_PTR extra_info, H
|
|||
hook.wHitTestCode = hittest;
|
||||
hook.dwExtraInfo = extra_info;
|
||||
hook.mouseData = msg->wParam;
|
||||
call_hooks( WH_CBT, HCBT_CLICKSKIPPED, message, (LPARAM)&hook, sizeof(hook) );
|
||||
accept_hardware_message( hw_id );
|
||||
call_hooks( WH_CBT, HCBT_CLICKSKIPPED, message, (LPARAM)&hook, sizeof(hook) );
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue