[gnome-shell] overview: Handle sessionMode.hasOverview changes



commit e00eb06f66aaa41b9ba40db8bb6ef07570629dc1
Author: Florian MÃllner <fmuellner gnome org>
Date:   Thu Nov 29 17:58:31 2012 +0100

    overview: Handle sessionMode.hasOverview changes
    
    Currently we assume that either the initial sessionMode will have
    the overview or none of the pushed modes - starting without the
    overview and pushing a mode that adds it fails spectacularly.
    However this is exactly what we are going to do when loading external
    modes asynchronously - we'll initially use the default mode while
    the modes are loading, and switch to the mode passed on the command
    line when finished. So make sure that the overview UI gets initialized
    properly in that case.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=689304

 js/ui/overview.js |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)
---
diff --git a/js/ui/overview.js b/js/ui/overview.js
index 3f1663f..3c1f030 100644
--- a/js/ui/overview.js
+++ b/js/ui/overview.js
@@ -117,6 +117,7 @@ const Overview = new Lang.Class({
 
     _init: function() {
         this._overviewCreated = false;
+        this._initCalled = false;
 
         Main.sessionMode.connect('updated', Lang.bind(this, this._sessionUpdated));
         this._sessionUpdated();
@@ -204,6 +205,9 @@ const Overview = new Lang.Class({
         this._lastActiveWorkspaceIndex = -1;
         this._lastHoveredWindow = null;
         this._needsFakePointerEvent = false;
+
+        if (this._initCalled)
+            this.init();
     },
 
     _sessionUpdated: function() {
@@ -216,6 +220,8 @@ const Overview = new Lang.Class({
     // signal handlers and so forth. So we create them after
     // construction in this init() method.
     init: function() {
+        this._initCalled = true;
+
         if (this.isDummy)
             return;
 



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