[gnome-shell] workspacesView: Consider workspaces-only-on-primary when panning
- From: Florian Müllner <fmuellner src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell] workspacesView: Consider workspaces-only-on-primary when panning
- Date: Mon, 27 Jun 2016 14:32:50 +0000 (UTC)
commit 21ddbf0b8f5a12f9cd1eeb976f8037eafc3c3abe
Author: Florian Müllner <fmuellner gnome org>
Date: Fri Jun 24 18:19:40 2016 +0200
workspacesView: Consider workspaces-only-on-primary when panning
It is odd to switch workspaces on the primary monitor when panning on
a monitor without workspaces, so reject the gesture on non-primary
monitors when workspaces-only-on-primary is disabled.
https://bugzilla.gnome.org/show_bug.cgi?id=766883
js/ui/workspacesView.js | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)
---
diff --git a/js/ui/workspacesView.js b/js/ui/workspacesView.js
index f8217cf..2eacb5f 100644
--- a/js/ui/workspacesView.js
+++ b/js/ui/workspacesView.js
@@ -437,6 +437,12 @@ const WorkspacesDisplay = new Lang.Class({
let panAction = new Clutter.PanAction({ threshold_trigger_edge: Clutter.GestureTriggerEdge.AFTER });
panAction.connect('pan', Lang.bind(this, this._onPan));
panAction.connect('gesture-begin', Lang.bind(this, function() {
+ if (this._workspacesOnlyOnPrimary) {
+ let event = Clutter.get_current_event();
+ if (this._getMonitorIndexForEvent(event) != this._primaryIndex)
+ return false;
+ }
+
for (let i = 0; i < this._workspacesViews.length; i++)
this._workspacesViews[i].startSwipeScroll();
return true;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]