workspace: Split preparation steps from zoomFromOverview

Next commit will bind the workspace state adjustment to the snap
adjustment in WorkspacesView, and we'll need the preparation
steps but not the easing of the state adjustment.

Split preparation steps from zoomFromOverview() into a new method
prepareToLeaveOverview().

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1613>
This commit is contained in:
Georges Basile Stavracas Neto 2021-01-01 13:07:06 -03:00 committed by Marge Bot
parent 4cf5b4a6d8
commit 176ea3b1ef

View File

@ -1165,7 +1165,7 @@ class Workspace extends St.Widget {
});
}
zoomFromOverview() {
prepareToLeaveOverview() {
for (let i = 0; i < this._windows.length; i++)
this._windows[i].remove_all_transitions();
@ -1176,6 +1176,10 @@ class Workspace extends St.Widget {
this.layout_manager.layout_frozen = true;
this._overviewHiddenId = Main.overview.connect('hidden', this._doneLeavingOverview.bind(this));
}
zoomFromOverview() {
this.prepareToLeaveOverview();
if (this.metaWorkspace !== null && !this.metaWorkspace.active)
return;