Rebase against c266d373deb417abef4883f59daa5d517b77e76c.

[user32-MOUSEHOOKSTRUCTEX]
Removed patch to pass MOUSEHOOKSTRUCTEX struct to mouse hook callback (accepted
upstream).
This commit is contained in:
Sebastian Lackner 2016-02-05 20:03:27 +01:00
parent 750454d6f1
commit 5289f77aad
4 changed files with 106 additions and 193 deletions

View File

@ -51,7 +51,7 @@ usage()
# Get the upstream commit sha
upstream_commit()
{
echo "b21a3240705fdaf9f70a0eb1d2ff4736efcd35c9"
echo "c266d373deb417abef4883f59daa5d517b77e76c"
}
# Show version information
@ -305,7 +305,6 @@ patch_enable_all ()
enable_user32_GetSystemMetrics="$1"
enable_user32_Invalidate_Key_State="$1"
enable_user32_ListBox_Size="$1"
enable_user32_MOUSEHOOKSTRUCTEX="$1"
enable_user32_Mouse_Message_Hwnd="$1"
enable_user32_Refresh_MDI_Menus="$1"
enable_user32_ScrollWindowEx="$1"
@ -1055,9 +1054,6 @@ patch_enable ()
user32-ListBox_Size)
enable_user32_ListBox_Size="$2"
;;
user32-MOUSEHOOKSTRUCTEX)
enable_user32_MOUSEHOOKSTRUCTEX="$2"
;;
user32-Mouse_Message_Hwnd)
enable_user32_Mouse_Message_Hwnd="$2"
;;
@ -6234,21 +6230,6 @@ if test "$enable_user32_ListBox_Size" -eq 1; then
) >> "$patchlist"
fi
# Patchset user32-MOUSEHOOKSTRUCTEX
# |
# | This patchset fixes the following Wine bugs:
# | * [#38314] Pass MOUSEHOOKSTRUCTEX struct to mouse hook callback
# |
# | Modified files:
# | * dlls/user32/message.c
# |
if test "$enable_user32_MOUSEHOOKSTRUCTEX" -eq 1; then
patch_apply user32-MOUSEHOOKSTRUCTEX/0001-user32-Add-MOUSEHOOKSTRUCTEX-to-fix-mouse-wheel-supp.patch
(
echo '+ { "Kira Backes", "user32: Add MOUSEHOOKSTRUCTEX to fix mouse wheel support for JA2 1.13 and other apps which use it.", 1 },';
) >> "$patchlist"
fi
# Patchset user32-Mouse_Message_Hwnd
# |
# | This patchset fixes the following Wine bugs:

View File

@ -1,67 +0,0 @@
From f3a55ca22853088d82f30711f9616b22b20bd228 Mon Sep 17 00:00:00 2001
From: Kira Backes <kira.backes@nrwsoft.de>
Date: Tue, 22 Dec 2015 16:34:41 +0100
Subject: user32: Add MOUSEHOOKSTRUCTEX to fix mouse wheel support for JA2 1.13
and other apps which use it
- Fixes out-of-bounds access for programs which cast to MOUSEHOOKSTRUCTEX (instead of just MOUSEHOOKSTRUCT) on mouse hooks
- Enables mouse wheel support for those programs
- Fixes Bug 38314 (and maybe others?)
Signed-off-by: Kira Backes <kira.backes@nrwsoft.de>
Signed-off-by: Sebastian Lackner <sebastian@fds-team.de>
---
dlls/user32/message.c | 26 +++++++++++++++++---------
1 file changed, 17 insertions(+), 9 deletions(-)
diff --git a/dlls/user32/message.c b/dlls/user32/message.c
index 96e7f2e..b96418f 100644
--- a/dlls/user32/message.c
+++ b/dlls/user32/message.c
@@ -2488,8 +2488,12 @@ static BOOL process_mouse_message( MSG *msg, UINT hw_id, ULONG_PTR extra_info, H
INT hittest;
EVENTMSG event;
GUITHREADINFO info;
- MOUSEHOOKSTRUCT hook;
BOOL eatMsg;
+ struct /* MOUSEHOOKSTRUCTEX */
+ {
+ MOUSEHOOKSTRUCT hook;
+ DWORD mouseData;
+ } hook;
/* find the window to dispatch this mouse message to */
@@ -2584,17 +2588,21 @@ 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.hook.pt = msg->pt;
+ hook.hook.hwnd = msg->hwnd;
+ hook.hook.wHitTestCode = hittest;
+ hook.hook.dwExtraInfo = extra_info;
+ /* the correct mouseData for the events WM_XBUTTONDOWN, WM_XBUTTONUP, WM_XBUTTONDBLCLK,
+ * WM_NCXBUTTONDOWN, WM_NCXBUTTONUP, and WM_NCXBUTTONDBLCLK is not yet implemented */
+ hook.mouseData = (msg->message == WM_MOUSEWHEEL ? msg->wParam : 0);
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.hook.pt = msg->pt;
+ hook.hook.hwnd = msg->hwnd;
+ hook.hook.wHitTestCode = hittest;
+ hook.hook.dwExtraInfo = extra_info;
+ hook.mouseData = (msg->message == WM_MOUSEWHEEL ? msg->wParam : 0);
HOOK_CallHooks( WH_CBT, HCBT_CLICKSKIPPED, message, (LPARAM)&hook, TRUE );
accept_hardware_message( hw_id, TRUE );
return FALSE;
--
2.6.4

View File

@ -1 +0,0 @@
Fixes: [38314] Pass MOUSEHOOKSTRUCTEX struct to mouse hook callback

File diff suppressed because it is too large Load Diff