mirror of
https://github.com/edu4rdshl/gnome-shell.git
synced 2026-07-18 07:34:54 +00:00
ui/windowManager: Fix horizontal scrolling when smooth events are used
Currently, gnome-shell uses the wrong scrolling direction for horizontal scrolling events. When dx < 0 for a smooth scroll event, then the scrolling direction is supposed to be Clutter.ScrollDirection.LEFT, instead of Clutter.ScrollDirection.RIGHT, as dx is smaller than 0. Fix this issue by swapping the values LEFT and RIGHT. Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1665>
This commit is contained in:
parent
21faae480e
commit
d02612e790
1 changed files with 2 additions and 2 deletions
|
|
@ -1873,8 +1873,8 @@ var WindowManager = class {
|
|||
const [dx, dy] = event.get_scroll_delta();
|
||||
if (Math.abs(dx) > Math.abs(dy)) {
|
||||
direction = dx < 0
|
||||
? Clutter.ScrollDirection.RIGHT
|
||||
: Clutter.ScrollDirection.LEFT;
|
||||
? Clutter.ScrollDirection.LEFT
|
||||
: Clutter.ScrollDirection.RIGHT;
|
||||
} else if (Math.abs(dy) > Math.abs(dx)) {
|
||||
direction = dy < 0
|
||||
? Clutter.ScrollDirection.UP
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue