GNOME Bugzilla – Bug 681074
Call clutter_input_device_update_from_event from clutter_x11_handle_event
Last modified: 2012-08-16 11:24:32 UTC
As per the API docs for clutter_input_device_update_from_event, it should be called right after creating the ClutterEvent and before emitting it.
Created attachment 220153 [details] [review] Call clutter_input_device_update_from_event from clutter_x11_handle_event
devices are updated when the event is being processed by the stage, not when the event is translated - since we do event compression and we also inject events into the queue at that point. the API documentation is for toolkit embedding Clutter - not for Clutter itself. I need more context than "this is needed because the API says so": I know what the API documentation says, I wrote both the function and the documentation that comes with it.
It's because of Mutter, which calls clutter_x11_handle_event. In a recent commit a few weeks ago (9e02ef459), touch events stopped flowing within Mutter because we started using _clutter_input_device_update instead of always calling _clutter_stage_do_pick.
the reason why the ClutterInputDevice is not updated is because the DeviceManager will only update pointer devices and ignore touch devices - something that I forgot to add when I introduced XI2.2 support.
Created attachment 221274 [details] [review] device-manager: Update touchpad and touchscreen devices We are also interested in keeping their state updated.
mmh, no, that's not enough - DeviceManager.update_devices() is not used.
Created attachment 221279 [details] [review] Associate the device to a stage on touch events Just like we do for crossing events, we need to update the stage pointer inside ClutterInputDevice on TOUCH_BEGIN and TOUCH_END.
Attachment 221279 [details] pushed as 803b3ba - Associate the device to a stage on touch events