[gnome-shell/eos3.8: 59/255] overview: Switch to the apps page when startup is completed if needed



commit 330d72babec259dd1620c21d8b79453a6eaffe68
Author: Mario Sanchez Prada <mario endlessm com>
Date:   Wed Jan 31 20:35:54 2018 +0000

    overview: Switch to the apps page when startup is completed if needed
    
    Trying to switch earlier than this might result in the shell staying
    in a funny state, that causes strange effects and bugs, such as showing
    windows in something like the window picker mode (but that it's not
    properly initialized) or preventing the DnD operations from working
    due to the wrong hierarchy of visible Clutter actors hanging off the
    root stage object.
    
    Also, don't show the overview at startup if windows are visible, which
    could cause some also funny situations when restarting the shell.
    
    https://phabricator.endlessm.com/T17789
    https://phabricator.endlessm.com/T18032
    https://phabricator.endlessm.com/T19778

 js/ui/overview.js     | 5 +++++
 js/ui/viewSelector.js | 5 +++++
 2 files changed, 10 insertions(+)
---
diff --git a/js/ui/overview.js b/js/ui/overview.js
index 431dfd7996..370f91b6a8 100644
--- a/js/ui/overview.js
+++ b/js/ui/overview.js
@@ -272,6 +272,7 @@ var Overview = class {
         this._shellInfo = new ShellInfo();
 
         this.viewSelector.connect('page-changed', this._onPageChanged.bind(this));
+        Main.layoutManager.connect('startup-prepared', this._onStartupPrepared.bind(this));
         Main.layoutManager.connect('monitors-changed', this._relayout.bind(this));
         this._relayout();
     }
@@ -485,6 +486,10 @@ var Overview = class {
         this._showOrSwitchPage(ViewSelector.ViewPage.WINDOWS);
     }
 
+    _onStartupPrepared() {
+        this.showApps();
+    }
+
     fadeInDesktop() {
         this._desktopFade.opacity = 0;
         this._desktopFade.show();
diff --git a/js/ui/viewSelector.js b/js/ui/viewSelector.js
index 4b01e66efd..46d6268a6e 100644
--- a/js/ui/viewSelector.js
+++ b/js/ui/viewSelector.js
@@ -214,6 +214,11 @@ var ViewSelector = GObject.registerClass({
                 this._workspacesPage.opacity = 0;
                 this._workspacesPage.hide();
             }
+
+            // Make sure to hide the overview immediately if we're starting up
+            // coming from a previous session with apps running and visible.
+            if (Main.layoutManager.startingUp && Main.workspaceMonitor.hasVisibleWindows)
+                Main.overview.hide();
         });
 
         Main.wm.addKeybinding('toggle-application-view',


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