[gnome-shell] workspace: Fix activating windows from xdnd operations



commit 1cf64b547103d1bf76949519ee3714c1a4cb8846
Author: Florian MÃllner <fmuellner gnome org>
Date:   Sat Sep 10 00:47:21 2011 +0200

    workspace: Fix activating windows from xdnd operations
    
    Commit e5bc3a2ba83 changed the hierarchy of WindowClone, which
    broke activating windows on hover during xdnd operations. To
    avoid intrusive changes, just hide the new actor from picks so
    that DND operations pick the actor actually meant to represent
    the corresponding window.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=658640

 js/ui/workspace.js |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)
---
diff --git a/js/ui/workspace.js b/js/ui/workspace.js
index ae3a092..55e93f3 100644
--- a/js/ui/workspace.js
+++ b/js/ui/workspace.js
@@ -102,6 +102,12 @@ WindowClone.prototype = {
         this._windowClone = new Clutter.Clone({ source: realWindow.get_texture(),
                                                 x: -borderX,
                                                 y: -borderY });
+        // We expect this.actor to be used for all interaction rather than
+        // this._windowClone; as the former is reactive and the latter
+        // is not, this just works for most cases. However, for DND all
+        // actors are picked, so DND operations would operate on the clone.
+        // To avoid this, we hide it from pick.
+        Shell.util_set_hidden_from_pick(this._windowClone, true);
 
         this.origX = realWindow.x + borderX;
         this.origY = realWindow.y + borderY;



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]