backend-x11: Also spoof Enter/Leave notifies as well
So that we track when the user enters/exits the frame window appropriately. This fixes a rogue cursor appearing when the window doesn't define one.
This commit is contained in:
parent
d561b3b18f
commit
7e7c8ecbd4
@ -129,6 +129,21 @@ translate_device_event (MetaBackendX11 *x11,
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
translate_crossing_event (MetaBackendX11 *x11,
|
||||
XIEnterEvent *enter_event)
|
||||
{
|
||||
/* Throw out weird events generated by grabs. */
|
||||
if (enter_event->mode == XINotifyGrab ||
|
||||
enter_event->mode == XINotifyUngrab)
|
||||
{
|
||||
enter_event->event = None;
|
||||
return;
|
||||
}
|
||||
|
||||
enter_event->event = meta_backend_x11_get_xwindow (x11);
|
||||
}
|
||||
|
||||
/* Clutter makes the assumption that there is only one X window
|
||||
* per stage, which is a valid assumption to make for a generic
|
||||
* application toolkit. As such, it will ignore any events sent
|
||||
@ -161,6 +176,10 @@ maybe_spoof_event_as_stage_event (MetaBackendX11 *x11,
|
||||
case XI_TouchEnd:
|
||||
translate_device_event (x11, (XIDeviceEvent *) input_event);
|
||||
break;
|
||||
case XI_Enter:
|
||||
case XI_Leave:
|
||||
translate_crossing_event (x11, (XIEnterEvent *) input_event);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user