workspacesView/workspacesDisplay: Ignore emulated events

When handling all scroll directions, it is imperative to ignore emulated
events. Otherwise we may get the wrong scroll direction, e.g. when natural
scrolling is enabled.

Ignore pointer emulated events in WorkspaceDisplay._onScroll().

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1560>
This commit is contained in:
Georges Basile Stavracas Neto 2021-01-06 16:38:44 -03:00 committed by Marge Bot
parent eefed95fa7
commit 499af2dd81

View File

@ -756,6 +756,9 @@ class WorkspacesDisplay extends St.Widget {
if (!this._canScroll)
return Clutter.EVENT_PROPAGATE;
if (event.is_pointer_emulated())
return Clutter.EVENT_PROPAGATE;
let workspaceManager = global.workspace_manager;
let activeWs = workspaceManager.get_active_workspace();
let ws;