[gnome-shell] workspacesView/workspacesDisplay: Ignore emulated events



commit 499af2dd812b6dbac81209ccede0b1b3719703ba
Author: Georges Basile Stavracas Neto <georges stavracas gmail com>
Date:   Wed Jan 6 16:38:44 2021 -0300

    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>

 js/ui/workspacesView.js | 3 +++
 1 file changed, 3 insertions(+)
---
diff --git a/js/ui/workspacesView.js b/js/ui/workspacesView.js
index 4a11f08889..1e8faf3490 100644
--- a/js/ui/workspacesView.js
+++ b/js/ui/workspacesView.js
@@ -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;


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]