mirror of
https://github.com/brl/mutter.git
synced 2024-11-23 00:20:42 -05:00
clutter: Update device on touchpad gesture events
With commitbe3bca01a7
in place, we now possibly skip early calls to clutter_stage_repick_device() happening early during initialization. These were also indirectly the ones that eventually ended up in the first call to clutter_stage_pick_and_update_device() actually initializing the PointerDeviceEntry. With this no longer happening, we may end up with no PointerDeviceEntry implicitly set up after initialization, which may fail if the first event received from the seat pointer does not in fact trigger the clutter_stage_pick_and_update_device() call necessary to make things work from there on. And this does indeed happen on touchpads, since the first input event obtained after CLUTTER_DEVICE_ADDED is CLUTTER_TOUCHPAD_* instead of CLUTTER_MOTION. This finds an unset PointerDeviceEntry and crashes since the pointer device does still have no "presence" on the stage. Fix this by making CLUTTER_TOUCHPAD_* events also trigger a device update, so the fist event handled does always trigger the necessary device update. Fixes:be3bca01a7
("clutter: Check that pointer has coordinates prior to repick") Closes: https://gitlab.gnome.org/GNOME/mutter/-/issues/2978 Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3198>
This commit is contained in:
parent
133931e3a3
commit
26c2633b2c
@ -799,6 +799,9 @@ clutter_stage_handle_event (ClutterStage *stage,
|
||||
case CLUTTER_BUTTON_PRESS:
|
||||
case CLUTTER_TOUCH_BEGIN:
|
||||
case CLUTTER_TOUCH_UPDATE:
|
||||
case CLUTTER_TOUCHPAD_PINCH:
|
||||
case CLUTTER_TOUCHPAD_SWIPE:
|
||||
case CLUTTER_TOUCHPAD_HOLD:
|
||||
update_device_for_event (stage, event, TRUE);
|
||||
break;
|
||||
default:
|
||||
|
Loading…
Reference in New Issue
Block a user