Skip to content

Commit

Permalink
winex11.drv: Interpret mouse 6/7 as horiz scroll.
Browse files Browse the repository at this point in the history
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@tim32.org>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
  • Loading branch information
Muzer authored and julliard committed May 14, 2020
1 parent 526522c commit 893080e
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions dlls/winex11.drv/mouse.c
Expand Up @@ -74,8 +74,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
};
Expand All @@ -87,8 +87,8 @@ static const UINT button_up_flags[NB_BUTTONS] =
MOUSEEVENTF_RIGHTUP,
0,
0,
MOUSEEVENTF_XUP,
MOUSEEVENTF_XUP,
0,
0,
MOUSEEVENTF_XUP,
MOUSEEVENTF_XUP
};
Expand All @@ -100,8 +100,8 @@ static const UINT button_down_data[NB_BUTTONS] =
0,
WHEEL_DELTA,
-WHEEL_DELTA,
XBUTTON1,
XBUTTON2,
-WHEEL_DELTA,
WHEEL_DELTA,
XBUTTON1,
XBUTTON2
};
Expand All @@ -113,8 +113,8 @@ static const UINT button_up_data[NB_BUTTONS] =
0,
0,
0,
XBUTTON1,
XBUTTON2,
0,
0,
XBUTTON1,
XBUTTON2
};
Expand Down

0 comments on commit 893080e

Please sign in to comment.