[gnome-shell] viewSelector: Don't show pages until they need to be visible



commit 1139a02b407aa0efb52a8875525b48e52c5deb09
Author: Jasper St. Pierre <jstpierre mecheye net>
Date:   Wed Nov 20 12:06:14 2013 -0500

    viewSelector: Don't show pages until they need to be visible
    
    AppDisplay queues a deferred work to load frequently used apps when the
    apps page is loaded. Unfortunately, when the overview is first opened,
    all the pages start out visible and then immediately get hidden, so the
    deferred work runs immediately after the first overview opening, whether
    the user was going to view their frequent apps or not.
    
    Start all pages off as hidden, and rearrange the code so that pages are
    only shown when they really need to be.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=712753

 js/ui/viewSelector.js |   10 ++++------
 1 files changed, 4 insertions(+), 6 deletions(-)
---
diff --git a/js/ui/viewSelector.js b/js/ui/viewSelector.js
index eef8c0a..0bc0f20 100644
--- a/js/ui/viewSelector.js
+++ b/js/ui/viewSelector.js
@@ -157,17 +157,14 @@ const ViewSelector = new Lang.Class({
     },
 
     show: function() {
-        this._activePage = this._workspacesPage;
-
         this.reset();
-        this._appsPage.hide();
-        this._searchPage.hide();
+
         this._workspacesDisplay.show();
+        this._activePage = null;
+        this._showPage(this._workspacesPage);
 
         if (!this._workspacesDisplay.activeWorkspaceHasMaximizedWindows())
             Main.overview.fadeOutDesktop();
-
-        this._showPage(this._workspacesPage, true);
     },
 
     zoomFromOverview: function() {
@@ -203,6 +200,7 @@ const ViewSelector = new Lang.Class({
                                                       this._a11yFocusPage(page);
                                                   })
                                             });;
+        page.hide();
         this.actor.add_actor(page);
         return page;
     },


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