From e7c2d2c2772f12fbcf610ed578e47888ebb939bb Mon Sep 17 00:00:00 2001 From: Giovanni Campagna Date: Sun, 20 Feb 2011 18:41:47 +0100 Subject: [PATCH] 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 file changed, 3 insertions(+), 2 deletions(-) diff --git a/extensions/auto-move-windows/extension.js b/extensions/auto-move-windows/extension.js index ec966c24..658e62f0 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()); }