[gnome-shell/wip/fmuellner/notification-redux+sass: 134/145] messageTray: Acceptable version of the horrible hack



commit 4c4fa215854f52219c7ea8ab5544f80c1427e9e6
Author: Florian Müllner <fmuellner gnome org>
Date:   Fri Feb 13 21:12:53 2015 +0100

    messageTray: Acceptable version of the horrible hack

 js/ui/messageTray.js |   12 ++++++++++++
 1 files changed, 12 insertions(+), 0 deletions(-)
---
diff --git a/js/ui/messageTray.js b/js/ui/messageTray.js
index 800d390..234a8d9 100644
--- a/js/ui/messageTray.js
+++ b/js/ui/messageTray.js
@@ -1464,6 +1464,18 @@ const MessageTray = new Lang.Class({
             this._onStatusChanged(status);
         }));
 
+        global.stage.connect('enter-event', Lang.bind(this,
+            function(a, ev) {
+                // HACK: St uses ClutterInputDevice for hover tracking, which
+                // misses relevant X11 events when untracked actors are
+                // involved (read: the notification banner in normal mode),
+                // so fix up Clutter's view of the pointer position in
+                // that case.
+                let related = ev.get_related();
+                if (!related || this.actor.contains(related))
+                    global.sync_pointer();
+            }));
+
         this.actor = new St.Widget({ name: 'notification-container',
                                      x_expand: true, y_expand: true,
                                      layout_manager: new Clutter.BinLayout() });


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