[gnome-shell-extensions] auto-move-windows: Move check for dynamic workspaces
- From: Florian Müllner <fmuellner src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell-extensions] auto-move-windows: Move check for dynamic workspaces
- Date: Thu, 24 Apr 2014 17:16:37 +0000 (UTC)
commit c8b67cb84dd380fd4dc30076ba65c2efc0a1d424
Author: Florian Müllner <fmuellner gnome org>
Date: Thu Apr 24 12:53:22 2014 +0200
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
extensions/auto-move-windows/extension.js | 8 ++++++--
1 files changed, 6 insertions(+), 2 deletions(-)
---
diff --git a/extensions/auto-move-windows/extension.js b/extensions/auto-move-windows/extension.js
index db27685..8c502a6 100644
--- a/extensions/auto-move-windows/extension.js
+++ b/extensions/auto-move-windows/extension.js
@@ -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();
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]