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
This commit is contained in:
parent
4eff643d59
commit
d903e831f3
@ -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,
|
||||
|
Loading…
Reference in New Issue
Block a user