From ae7f30483d688f80281cd2e713b1c67d3baff170 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Florian=20M=C3=BCllner?= Date: Wed, 5 May 2010 22:31:01 +0200 Subject: [PATCH] [linearView] Activate workspace on window drop When a dropped window is accepted by a workspace in linear view, it is moved to the new workspace. After that, the view zooms back in on the original workspace, resulting in the moved window disappearing from the user's sight. Change this rather unexpected behavior, so that a successful drop triggers a switch to the new workspace. This also improves consistency with drops on the (+) area. https://bugzilla.gnome.org/show_bug.cgi?id=617785 --- js/ui/workspacesView.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/js/ui/workspacesView.js b/js/ui/workspacesView.js index a07834c68..1b396f0b5 100644 --- a/js/ui/workspacesView.js +++ b/js/ui/workspacesView.js @@ -1007,8 +1007,12 @@ SingleView.prototype = { let [dx, dy] = this._workspaces[i].actor.get_transformed_position(); let [dw, dh] = this._workspaces[i].actor.get_transformed_size(); - if (x > dx && x < dx + dw && y > dy && y < dy + dh) - return this._workspaces[i].acceptDrop(source, dropActor, x, y, time); + if (x > dx && x < dx + dw && y > dy && y < dy + dh) { + let accept = this._workspaces[i].acceptDrop(source, dropActor, x, y, time); + if (accept) + this._workspaces[i].metaWorkspace.activate(time); + return accept; + } } let [dx, dy] = this._newWorkspaceArea.actor.get_transformed_position();