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.
This commit is contained in:
Jonathan Matthew 2009-02-19 18:53:10 +10:00
parent 7b2d333b2e
commit 0eb4873ba0

View File

@ -709,10 +709,9 @@ Workspace.prototype = {
_onCloneSelected : function (clone, time) { _onCloneSelected : function (clone, time) {
let global = Shell.Global.get(); let global = Shell.Global.get();
let activeWorkspace = global.screen.get_active_workspace_index(); let activeWorkspace = global.screen.get_active_workspace_index();
let windowWorkspace = clone.realWindow.get_workspace();
if (windowWorkspace != activeWorkspace) { if (this.workspaceNum != activeWorkspace) {
let workspace = global.screen.get_workspace_by_index(windowWorkspace); let workspace = global.screen.get_workspace_by_index(this.workspaceNum);
workspace.activate_with_focus(clone.metaWindow, time); workspace.activate_with_focus(clone.metaWindow, time);
} else } else
clone.metaWindow.activate(time); clone.metaWindow.activate(time);