Clean up crossing event synthesis code

Clutter should just require that the windowing system used by a backend
adds a device to the stage when the device enters, and removes it from
the stage when the device leaves; with this information, we can
synthesize every crossing event and update the device state without
other intervention from the backend-specific code.

The generation of additional crossing events for actors that are
covering the stage at the coordinates of the crossing event should be
delegated to the event processing code.

The x11 and win32 backends need to be modified to relay the enter and
leave events from the windowing system.
This commit is contained in:
Emmanuele Bassi
2011-01-27 17:26:16 +00:00
parent b3784bd2b4
commit 82d1e5a6ee
10 changed files with 238 additions and 157 deletions

View File

@ -543,6 +543,7 @@ clutter_event_set_device (ClutterEvent *event,
ClutterInputDevice *device)
{
g_return_if_fail (event != NULL);
g_return_if_fail (device == NULL || CLUTTER_IS_INPUT_DEVICE (device));
if (is_event_allocated (event))
{