From 0eb4873ba00d1151a0b9ec3ed903586cccd1d478 Mon Sep 17 00:00:00 2001 From: Jonathan Matthew Date: Thu, 19 Feb 2009 18:53:10 +1000 Subject: [PATCH] Bug 572384 - can't select windows that are on all workspaces in the overlay Workspace._onCloneSelected doesn't need to ask the window which workspace it's on, it can just use its own workspaceNum field. --- js/ui/workspaces.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/js/ui/workspaces.js b/js/ui/workspaces.js index ce9632990..cf15ebee5 100644 --- a/js/ui/workspaces.js +++ b/js/ui/workspaces.js @@ -709,10 +709,9 @@ Workspace.prototype = { _onCloneSelected : function (clone, time) { let global = Shell.Global.get(); let activeWorkspace = global.screen.get_active_workspace_index(); - let windowWorkspace = clone.realWindow.get_workspace(); - if (windowWorkspace != activeWorkspace) { - let workspace = global.screen.get_workspace_by_index(windowWorkspace); + if (this.workspaceNum != activeWorkspace) { + let workspace = global.screen.get_workspace_by_index(this.workspaceNum); workspace.activate_with_focus(clone.metaWindow, time); } else clone.metaWindow.activate(time);