fix selection of all-workspace windows

all-workspace windows can be active on every workspace.
https://bugzilla.gnome.org/show_bug.cgi?id=603078
This commit is contained in:
Maxim Ermilov 2010-02-19 19:42:36 +03:00
parent 49a9335f68
commit cfd63c7d4c
2 changed files with 4 additions and 3 deletions

View File

@ -400,13 +400,14 @@ function getRunDialog() {
* activateWindow:
* @window: the Meta.Window to activate
* @time: (optional) current event time
* @workspaceNum: (optional) window's workspace number
*
* Activates @window, switching to its workspace first if necessary,
* and switching out of the overview if it's currently active
*/
function activateWindow(window, time) {
function activateWindow(window, time, workspaceNum) {
let activeWorkspaceNum = global.screen.get_active_workspace_index();
let windowWorkspaceNum = window.get_workspace().index();
let windowWorkspaceNum = (workspaceNum !== undefined) ? workspaceNum : window.get_workspace().index();
if (!time)
time = global.get_current_time();

View File

@ -1417,7 +1417,7 @@ Workspace.prototype = {
},
_onCloneSelected : function (clone, time) {
Main.activateWindow(clone.metaWindow, time);
Main.activateWindow(clone.metaWindow, time, this.workspaceNum);
},
_removeSelf : function(actor, event) {