[gnome-shell/wip/fmuellner/notification-redux+sass: 125/141] messageTray: Work around glitches with hover tracking
- From: Florian Müllner <fmuellner src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell/wip/fmuellner/notification-redux+sass: 125/141] messageTray: Work around glitches with hover tracking
- Date: Thu, 19 Feb 2015 21:05:21 +0000 (UTC)
commit 11785e7f9f87c78017f1a7191c73a8f905eb0b69
Author: Florian Müllner <fmuellner gnome org>
Date: Fri Feb 13 21:12:53 2015 +0100
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.
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 6892edb..73bb239 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,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]