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
This commit is contained in:
parent
5ecc204d57
commit
e00eb06f66
@ -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;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user