[gnome-shell] workspace: Ignore new windows that appear while the overview is closing



commit 7c1b30b2723624129a17001e6c5ad6049f3e82e0
Author: Daniel van Vugt <daniel van vugt canonical com>
Date:   Wed Sep 16 14:56:13 2020 +0800

    workspace: Ignore new windows that appear while the overview is closing
    
    This can easily happen if an app launches and maps a window faster than
    the overview closes. We don't want the window clone appearing and then
    suddenly disappearing in that case.
    
    Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1440>

 js/ui/workspace.js | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
---
diff --git a/js/ui/workspace.js b/js/ui/workspace.js
index 7bc3cdfb67..afdde824e1 100644
--- a/js/ui/workspace.js
+++ b/js/ui/workspace.js
@@ -1280,7 +1280,8 @@ class Workspace extends St.Widget {
     }
 
     _windowAdded(metaWorkspace, metaWin) {
-        this._doAddWindow(metaWin);
+        if (!Main.overview.closing)
+            this._doAddWindow(metaWin);
     }
 
     _windowRemoved(metaWorkspace, metaWin) {
@@ -1288,7 +1289,7 @@ class Workspace extends St.Widget {
     }
 
     _windowEnteredMonitor(metaDisplay, monitorIndex, metaWin) {
-        if (monitorIndex == this.monitorIndex)
+        if (monitorIndex === this.monitorIndex && !Main.overview.closing)
             this._doAddWindow(metaWin);
     }
 


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