auto-move-windows: Move check for dynamic workspaces
Move the check into checkWorkspaces rather than replacing the function conditionally, to handle changes to the setting. https://bugzilla.gnome.org/show_bug.cgi?id=728865
This commit is contained in:
@@ -91,6 +91,11 @@ function myCheckWorkspaces() {
|
||||
let i;
|
||||
let emptyWorkspaces = new Array(this._workspaces.length);
|
||||
|
||||
if (!Meta.prefs_get_dynamic_workspaces()) {
|
||||
this._checkWorkspacesId = 0;
|
||||
return false;
|
||||
}
|
||||
|
||||
for (i = 0; i < this._workspaces.length; i++) {
|
||||
let lastRemoved = this._workspaces[i]._lastRemovedWindow;
|
||||
if (lastRemoved &&
|
||||
@@ -155,8 +160,7 @@ function myCheckWorkspaces() {
|
||||
|
||||
function enable() {
|
||||
prevCheckWorkspaces = Main.wm._workspaceTracker._checkWorkspaces;
|
||||
if (Meta.prefs_get_dynamic_workspaces())
|
||||
Main.wm._workspaceTracker._checkWorkspaces = myCheckWorkspaces;
|
||||
Main.wm._workspaceTracker._checkWorkspaces = myCheckWorkspaces;
|
||||
|
||||
winMover = new WindowMover();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user