Murray Colpman : winex11.drv: Interpret mouse 6/7 as horiz scroll.

Alexandre Julliard julliard at winehq.org
Fri Aug 7 10:42:29 CDT 2020


Module: wine
Branch: stable
Commit: f13f1ec6faddeb916c4065b11c7ea70e4d1b0c6e
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=f13f1ec6faddeb916c4065b11c7ea70e4d1b0c6e

Author: Murray Colpman <muzer at tim32.org>
Date:   Tue May 12 00:39:02 2020 +0100

winex11.drv: Interpret mouse 6/7 as horiz scroll.

X11 Mouse buttons 6 and 7 were set to translate into browser
back/forward button events. However, this is based on an old convention
where buttons 6 and 7 could either mean horizontal scroll or browser
back/forward. Nowadays, 6 and 7 solely mean horizontal scroll, 8 and 9
being used for back/forward. In addition, the wide adoption of
two-finger two-dimensional scrolling on laptop trackpads since this code
was written has meant that back/forward events may be generated
unintentionally, which can be very disruptive when using tools such as
web browsers.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=49142
Signed-off-by: Murray Colpman <muzer at tim32.org>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
(cherry picked from commit 893080e4df5a45929320ebb88b8668eea316476c)
Signed-off-by: Michael Stefaniuc <mstefani at winehq.org>

---

 dlls/winex11.drv/mouse.c | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/dlls/winex11.drv/mouse.c b/dlls/winex11.drv/mouse.c
index 7f0edd9be6..c8a5749a2f 100644
--- a/dlls/winex11.drv/mouse.c
+++ b/dlls/winex11.drv/mouse.c
@@ -75,8 +75,8 @@ static const UINT button_down_flags[NB_BUTTONS] =
     MOUSEEVENTF_RIGHTDOWN,
     MOUSEEVENTF_WHEEL,
     MOUSEEVENTF_WHEEL,
-    MOUSEEVENTF_XDOWN,  /* FIXME: horizontal wheel */
-    MOUSEEVENTF_XDOWN,
+    MOUSEEVENTF_HWHEEL,
+    MOUSEEVENTF_HWHEEL,
     MOUSEEVENTF_XDOWN,
     MOUSEEVENTF_XDOWN
 };
@@ -88,8 +88,8 @@ static const UINT button_up_flags[NB_BUTTONS] =
     MOUSEEVENTF_RIGHTUP,
     0,
     0,
-    MOUSEEVENTF_XUP,
-    MOUSEEVENTF_XUP,
+    0,
+    0,
     MOUSEEVENTF_XUP,
     MOUSEEVENTF_XUP
 };
@@ -101,8 +101,8 @@ static const UINT button_down_data[NB_BUTTONS] =
     0,
     WHEEL_DELTA,
     -WHEEL_DELTA,
-    XBUTTON1,
-    XBUTTON2,
+    -WHEEL_DELTA,
+    WHEEL_DELTA,
     XBUTTON1,
     XBUTTON2
 };
@@ -114,8 +114,8 @@ static const UINT button_up_data[NB_BUTTONS] =
     0,
     0,
     0,
-    XBUTTON1,
-    XBUTTON2,
+    0,
+    0,
     XBUTTON1,
     XBUTTON2
 };




More information about the wine-cvs mailing list