[gnome-shell] [linearView] Activate workspace on window drop
- From: Florian Müllner <fmuellner src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell] [linearView] Activate workspace on window drop
- Date: Wed, 5 May 2010 22:06:57 +0000 (UTC)
commit ae7f30483d688f80281cd2e713b1c67d3baff170
Author: Florian Müllner <fmuellner src gnome org>
Date: Wed May 5 22:31:01 2010 +0200
[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 files changed, 6 insertions(+), 2 deletions(-)
---
diff --git a/js/ui/workspacesView.js b/js/ui/workspacesView.js
index a07834c..1b396f0 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();
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]