From 94aee7a738751194969b5cf7f055c4f3727fbf1e Mon Sep 17 00:00:00 2001 From: Kira Backes Date: Wed, 3 Feb 2016 23:58:17 -0700 Subject: [PATCH] user32: Add MOUSEHOOKSTRUCTEX for mouse wheel support. Signed-off-by: Kira Backes Signed-off-by: Alex Henrie Signed-off-by: Alexandre Julliard --- dlls/user32/message.c | 20 +++++++++++--------- include/winuser.h | 11 +++++++++++ 2 files changed, 22 insertions(+), 9 deletions(-) diff --git a/dlls/user32/message.c b/dlls/user32/message.c index ba3f4c6d86d..9e0ce05b215 100644 --- a/dlls/user32/message.c +++ b/dlls/user32/message.c @@ -2489,7 +2489,7 @@ static BOOL process_mouse_message( MSG *msg, UINT hw_id, ULONG_PTR extra_info, H INT hittest; EVENTMSG event; GUITHREADINFO info; - MOUSEHOOKSTRUCT hook; + MOUSEHOOKSTRUCTEX hook; BOOL eatMsg; /* find the window to dispatch this mouse message to */ @@ -2585,17 +2585,19 @@ static BOOL process_mouse_message( MSG *msg, UINT hw_id, ULONG_PTR extra_info, H /* message is accepted now (but may still get dropped) */ - hook.pt = msg->pt; - hook.hwnd = msg->hwnd; - hook.wHitTestCode = hittest; - hook.dwExtraInfo = extra_info; + hook.s.pt = msg->pt; + hook.s.hwnd = msg->hwnd; + hook.s.wHitTestCode = hittest; + hook.s.dwExtraInfo = extra_info; + hook.mouseData = msg->wParam; if (HOOK_CallHooks( WH_MOUSE, remove ? HC_ACTION : HC_NOREMOVE, message, (LPARAM)&hook, TRUE )) { - hook.pt = msg->pt; - hook.hwnd = msg->hwnd; - hook.wHitTestCode = hittest; - hook.dwExtraInfo = extra_info; + hook.s.pt = msg->pt; + hook.s.hwnd = msg->hwnd; + hook.s.wHitTestCode = hittest; + hook.s.dwExtraInfo = extra_info; + hook.mouseData = msg->wParam; HOOK_CallHooks( WH_CBT, HCBT_CLICKSKIPPED, message, (LPARAM)&hook, TRUE ); accept_hardware_message( hw_id, TRUE ); return FALSE; diff --git a/include/winuser.h b/include/winuser.h index 74d3cd58292..b5f89c170ed 100644 --- a/include/winuser.h +++ b/include/winuser.h @@ -385,6 +385,17 @@ typedef struct ULONG_PTR dwExtraInfo; } MOUSEHOOKSTRUCT, *PMOUSEHOOKSTRUCT, *LPMOUSEHOOKSTRUCT; +typedef struct +{ + struct { /* MOUSEHOOKSTRUCT */ + POINT pt; + HWND hwnd; + UINT wHitTestCode; + ULONG_PTR dwExtraInfo; + } DUMMYSTRUCTNAME; + DWORD mouseData; +} MOUSEHOOKSTRUCTEX, *PMOUSEHOOKSTRUCTEX, *LPMOUSEHOOKSTRUCTEX; + /* Hardware hook structure */