[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
This commit is contained in:
Florian Müllner 2010-05-05 22:31:01 +02:00
parent d6fc2cc36f
commit ae7f30483d

View File

@ -1007,8 +1007,12 @@ SingleView.prototype = {
let [dx, dy] = this._workspaces[i].actor.get_transformed_position(); let [dx, dy] = this._workspaces[i].actor.get_transformed_position();
let [dw, dh] = this._workspaces[i].actor.get_transformed_size(); let [dw, dh] = this._workspaces[i].actor.get_transformed_size();
if (x > dx && x < dx + dw && y > dy && y < dy + dh) if (x > dx && x < dx + dw && y > dy && y < dy + dh) {
return this._workspaces[i].acceptDrop(source, dropActor, x, y, time); 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(); let [dx, dy] = this._newWorkspaceArea.actor.get_transformed_position();