1
0
Fork 0

tests/clutter/conform: Wait for stage update right after showing stage

Showing the stage always results in an initial update being queued. If the
virtual input events from the test ends up being dispatched after that, the
`wait_for_update()` checks gets out of sync, as the first update ended up
waiting for the initial update, not the one from the input event.

Fix the gesture test by adding another call to `wait_stage_updated()` right
after `clutter_actor_show()`.

Closes: https://gitlab.gnome.org/GNOME/mutter/-/issues/3521
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3795>
This commit is contained in:
Jonas Dreßler 2024-06-08 14:20:26 +02:00 committed by Marge Bot
parent 408cb6ee57
commit 530659c643

View file

@ -146,6 +146,7 @@ gesture_state_machine_move_to_waiting (void)
&was_updated);
clutter_actor_show (stage);
wait_stage_updated (&was_updated);
clutter_virtual_input_device_notify_absolute_motion (virtual_pointer, now_us, 15, 15);
clutter_virtual_input_device_notify_button (virtual_pointer, now_us,
@ -205,6 +206,7 @@ gesture_state_machine_move_to_cancelled_while_possible (void)
&was_updated);
clutter_actor_show (stage);
wait_stage_updated (&was_updated);
clutter_virtual_input_device_notify_absolute_motion (virtual_pointer, now_us, 15, 15);
clutter_virtual_input_device_notify_button (virtual_pointer, now_us,
@ -257,6 +259,7 @@ gesture_state_machine_move_to_cancelled_on_sequence_cancel (void)
&was_updated);
clutter_actor_show (stage);
wait_stage_updated (&was_updated);
clutter_virtual_input_device_notify_absolute_motion (virtual_pointer, now_us, 15, 15);
clutter_virtual_input_device_notify_button (virtual_pointer, now_us,
@ -311,6 +314,7 @@ gesture_multiple_mouse_buttons (void)
&was_updated);
clutter_actor_show (stage);
wait_stage_updated (&was_updated);
clutter_virtual_input_device_notify_absolute_motion (virtual_pointer, now_us, 15, 15);
clutter_virtual_input_device_notify_button (virtual_pointer, now_us,