[gnome-shell-extensions] auto-move-windows: fix off-by-one error
- From: Giovanni Campagna <gcampagna src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell-extensions] auto-move-windows: fix off-by-one error
- Date: Sun, 20 Feb 2011 17:46:06 +0000 (UTC)
commit e7c2d2c2772f12fbcf610ed578e47888ebb939bb
Author: Giovanni Campagna <gcampagna src gnome org>
Date: Sun Feb 20 18:41:47 2011 +0100
auto-move-windows: fix off-by-one error
The internal workspace index starts from 0, but the one in the
settings starts from 1.
extensions/auto-move-windows/extension.js | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
---
diff --git a/extensions/auto-move-windows/extension.js b/extensions/auto-move-windows/extension.js
index ec966c2..658e62f 100644
--- a/extensions/auto-move-windows/extension.js
+++ b/extensions/auto-move-windows/extension.js
@@ -55,8 +55,9 @@ WindowMover.prototype = {
let apps_to_space = spaces[j].split(":");
// Match application id
if (apps_to_space[0] == app_id) {
- let workspace_num = parseInt(apps_to_space[1]);
- this._ensureAtLeastWorkspaces(workspace_num);
+ let workspace_num = parseInt(apps_to_space[1]) - 1;
+ // FIXME: does not work with automatic management of workspaces
+ // this._ensureAtLeastWorkspaces(workspace_num);
window.change_workspace_by_index(workspace_num, false, global.get_current_time());
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]