backend-x11: Fix our awful hack for crossing events, too
For enter / leave events, which we use in the UI code, we need to make sure that these coordinates are root-relative as well, otherwise the cursor when entering frames might be incorrect.
This commit is contained in:
parent
d74b0d5be8
commit
2cbaa6660c
@ -143,6 +143,8 @@ static void
|
|||||||
translate_crossing_event (MetaBackendX11 *x11,
|
translate_crossing_event (MetaBackendX11 *x11,
|
||||||
XIEnterEvent *enter_event)
|
XIEnterEvent *enter_event)
|
||||||
{
|
{
|
||||||
|
MetaBackendX11Private *priv = meta_backend_x11_get_instance_private (x11);
|
||||||
|
|
||||||
/* Throw out weird events generated by grabs. */
|
/* Throw out weird events generated by grabs. */
|
||||||
if (enter_event->mode == XINotifyGrab ||
|
if (enter_event->mode == XINotifyGrab ||
|
||||||
enter_event->mode == XINotifyUngrab)
|
enter_event->mode == XINotifyUngrab)
|
||||||
@ -151,7 +153,15 @@ translate_crossing_event (MetaBackendX11 *x11,
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Window stage_window = meta_backend_x11_get_xwindow (x11);
|
||||||
|
if (enter_event->event != stage_window)
|
||||||
|
{
|
||||||
|
/* See above for the rationale for this... */
|
||||||
|
g_assert (priv->mode == META_BACKEND_X11_MODE_COMPOSITOR);
|
||||||
enter_event->event = meta_backend_x11_get_xwindow (x11);
|
enter_event->event = meta_backend_x11_get_xwindow (x11);
|
||||||
|
enter_event->event_x = enter_event->root_x;
|
||||||
|
enter_event->event_y = enter_event->root_y;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
Loading…
Reference in New Issue
Block a user