workspacesView: Don't zoom into the overview based on a signal
Instead, simply have somebody else call us, like we do for hiding the overview as well.
This commit is contained in:
parent
7747f1c31d
commit
287ddda5df
@ -59,18 +59,6 @@ const WorkspacesView = new Lang.Class({
|
|||||||
this._extraWorkspaces = [];
|
this._extraWorkspaces = [];
|
||||||
this._updateExtraWorkspaces();
|
this._updateExtraWorkspaces();
|
||||||
|
|
||||||
// Position/scale the desktop windows and their children after the
|
|
||||||
// workspaces have been created. This cannot be done first because
|
|
||||||
// window movement depends on the Workspaces object being accessible
|
|
||||||
// as an Overview member.
|
|
||||||
this._overviewShowingId =
|
|
||||||
Main.overview.connect('showing',
|
|
||||||
Lang.bind(this, function() {
|
|
||||||
for (let w = 0; w < this._workspaces.length; w++)
|
|
||||||
this._workspaces[w].zoomToOverview();
|
|
||||||
for (let w = 0; w < this._extraWorkspaces.length; w++)
|
|
||||||
this._extraWorkspaces[w].zoomToOverview();
|
|
||||||
}));
|
|
||||||
this._overviewShownId =
|
this._overviewShownId =
|
||||||
Main.overview.connect('shown',
|
Main.overview.connect('shown',
|
||||||
Lang.bind(this, function() {
|
Lang.bind(this, function() {
|
||||||
@ -141,12 +129,14 @@ const WorkspacesView = new Lang.Class({
|
|||||||
return this._workspaces[active];
|
return this._workspaces[active];
|
||||||
},
|
},
|
||||||
|
|
||||||
hide: function() {
|
zoomToOverview: function() {
|
||||||
let activeWorkspaceIndex = global.screen.get_active_workspace_index();
|
for (let w = 0; w < this._workspaces.length; w++)
|
||||||
let activeWorkspace = this._workspaces[activeWorkspaceIndex];
|
this._workspaces[w].zoomToOverview();
|
||||||
|
for (let w = 0; w < this._extraWorkspaces.length; w++)
|
||||||
activeWorkspace.actor.raise_top();
|
this._extraWorkspaces[w].zoomToOverview();
|
||||||
|
},
|
||||||
|
|
||||||
|
zoomFromOverview: function() {
|
||||||
this.actor.remove_clip();
|
this.actor.remove_clip();
|
||||||
|
|
||||||
for (let w = 0; w < this._workspaces.length; w++)
|
for (let w = 0; w < this._workspaces.length; w++)
|
||||||
@ -276,7 +266,6 @@ const WorkspacesView = new Lang.Class({
|
|||||||
_onDestroy: function() {
|
_onDestroy: function() {
|
||||||
this._destroyExtraWorkspaces();
|
this._destroyExtraWorkspaces();
|
||||||
this.scrollAdjustment.run_dispose();
|
this.scrollAdjustment.run_dispose();
|
||||||
Main.overview.disconnect(this._overviewShowingId);
|
|
||||||
Main.overview.disconnect(this._overviewShownId);
|
Main.overview.disconnect(this._overviewShownId);
|
||||||
global.window_manager.disconnect(this._switchWorkspaceNotifyId);
|
global.window_manager.disconnect(this._switchWorkspaceNotifyId);
|
||||||
this._settings.disconnect(this._updateExtraWorkspacesId);
|
this._settings.disconnect(this._updateExtraWorkspacesId);
|
||||||
@ -443,6 +432,8 @@ const WorkspacesDisplay = new Lang.Class({
|
|||||||
|
|
||||||
show: function() {
|
show: function() {
|
||||||
this._updateWorkspacesViews();
|
this._updateWorkspacesViews();
|
||||||
|
for (let i = 0; i < this._workspacesViews.length; i++)
|
||||||
|
this._workspacesViews[i].zoomToOverview();
|
||||||
|
|
||||||
this._restackedNotifyId =
|
this._restackedNotifyId =
|
||||||
Main.overview.connect('windows-restacked',
|
Main.overview.connect('windows-restacked',
|
||||||
@ -452,9 +443,8 @@ const WorkspacesDisplay = new Lang.Class({
|
|||||||
},
|
},
|
||||||
|
|
||||||
zoomFromOverview: function() {
|
zoomFromOverview: function() {
|
||||||
for (let i = 0; i < this._workspacesViews.length; i++) {
|
for (let i = 0; i < this._workspacesViews.length; i++)
|
||||||
this._workspacesViews[i].hide();
|
this._workspacesViews[i].zoomFromOverview();
|
||||||
}
|
|
||||||
},
|
},
|
||||||
|
|
||||||
hide: function() {
|
hide: function() {
|
||||||
|
Loading…
Reference in New Issue
Block a user