[gnome-shell/wip/carlosg/app-grid-gestures: 2/5] workspacesView: Make swipeTracker mutually exclusive with appDisplay




commit ed89998c17dd5912934c69810ff088db6f10fd06
Author: Carlos Garnacho <carlosg gnome org>
Date:   Thu Mar 18 18:42:21 2021 +0100

    workspacesView: Make swipeTracker mutually exclusive with appDisplay
    
    We either show the workspacesView or the appDisplay, yet the workspacesView
    gesture persists in the background. Disable it while the appDisplay is
    visible.

 js/ui/overview.js       | 8 ++++++++
 js/ui/workspacesView.js | 1 +
 2 files changed, 9 insertions(+)
---
diff --git a/js/ui/overview.js b/js/ui/overview.js
index 75fe6e1a8f..fd0b714203 100644
--- a/js/ui/overview.js
+++ b/js/ui/overview.js
@@ -109,6 +109,10 @@ class OverviewActor extends St.BoxLayout {
         return this._controls.searchEntry;
     }
 
+    get appDisplay() {
+        return this._controls.appDisplay;
+    }
+
     get controls() {
         return this._controls;
     }
@@ -672,5 +676,9 @@ var Overview = class {
     get searchEntry() {
         return this._overview.searchEntry;
     }
+
+    get appDisplay() {
+        return this._overview.appDisplay;
+    }
 };
 Signals.addSignalMethods(Overview.prototype);
diff --git a/js/ui/workspacesView.js b/js/ui/workspacesView.js
index 1af45d88d7..dd8270204b 100644
--- a/js/ui/workspacesView.js
+++ b/js/ui/workspacesView.js
@@ -917,6 +917,7 @@ class WorkspacesDisplay extends St.Widget {
     _updateSwipeTracker() {
         this._swipeTracker.enabled =
             this.mapped &&
+            !Main.overview.appDisplay.mapped &&
             !this._inWindowDrag &&
             !this._leavingOverview;
     }


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