From d903e831f3ed861a058b5f057ff2aef17e3b76fe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Florian=20M=C3=BCllner?= Date: Fri, 13 Feb 2015 21:12:53 +0100 Subject: [PATCH] messageTray: Work around glitches with hover tracking St's hover tracking uses ClutterInputDevice, which unfortunately may use an outdated cursor position to determine which actor is hovered. Using MetaCursorTracker instead would fix this, but would require linking St with libmutter - avoid this for now by manually fixing up Clutter's view of the pointer position in the case where we rely on it working properly. https://bugzilla.gnome.org/show_bug.cgi?id=744850 --- js/ui/messageTray.js | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/js/ui/messageTray.js b/js/ui/messageTray.js index 6b19d2004..2e400dc82 100644 --- a/js/ui/messageTray.js +++ b/js/ui/messageTray.js @@ -1369,6 +1369,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', reactive: true, track_hover: true,