[gnome-shell] workspacesView: Consider workspaces-only-on-primary when scrolling



commit 2ad2853278c6ad51005eaec9e6921d003c5abe83
Author: Florian Müllner <fmuellner gnome org>
Date:   Thu May 26 18:51:30 2016 +0200

    workspacesView: Consider workspaces-only-on-primary when scrolling
    
    It is odd to switch workspaces using the scroll wheel when the pointer
    is on a monitor without workspaces, so only handle scroll events on
    non-primary monitors when workspaces-only-on-primary is disabled.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=766883

 js/ui/workspacesView.js |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)
---
diff --git a/js/ui/workspacesView.js b/js/ui/workspacesView.js
index aaa9522..f8217cf 100644
--- a/js/ui/workspacesView.js
+++ b/js/ui/workspacesView.js
@@ -674,6 +674,11 @@ const WorkspacesDisplay = new Lang.Class({
     _onScrollEvent: function(actor, event) {
         if (!this.actor.mapped)
             return Clutter.EVENT_PROPAGATE;
+
+        if (this._workspacesOnlyOnPrimary &&
+            this._getMonitorIndexForEvent(event) != this._primaryIndex)
+            return Clutter.EVENT_PROPAGATE;
+
         let activeWs = global.screen.get_active_workspace();
         let ws;
         switch (event.get_scroll_direction()) {


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