From bd72b671fc39562be1fba7bebd00bbfed8270a87 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonas=20=C3=85dahl?= Date: Thu, 1 Dec 2022 22:45:11 +0100 Subject: [PATCH] tests/clutter/event-delivery: Queue update before waiting Part-of: --- src/tests/clutter/conform/event-delivery.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/tests/clutter/conform/event-delivery.c b/src/tests/clutter/conform/event-delivery.c index e1dba7e0d..0486479ff 100644 --- a/src/tests/clutter/conform/event-delivery.c +++ b/src/tests/clutter/conform/event-delivery.c @@ -21,9 +21,11 @@ on_event_return_stop (ClutterActor *actor, } static void -wait_stage_updated (gboolean *was_updated) +wait_stage_updated (ClutterStage *stage, + gboolean *was_updated) { *was_updated = FALSE; + clutter_stage_schedule_update (stage); while (!*was_updated) g_main_context_iteration (NULL, TRUE); } @@ -53,11 +55,11 @@ event_delivery_consecutive_touch_begin_end (void) clutter_virtual_input_device_notify_touch_up (virtual_pointer, now_us, 0); clutter_virtual_input_device_notify_touch_down (virtual_pointer, now_us, 0, 5, 5); g_assert_true (!was_updated); - wait_stage_updated (&was_updated); + wait_stage_updated (CLUTTER_STAGE (stage), &was_updated); g_assert_cmpint (n_captured_touch_events, ==, 3); clutter_virtual_input_device_notify_touch_up (virtual_pointer, now_us, 0); - wait_stage_updated (&was_updated); + wait_stage_updated (CLUTTER_STAGE (stage), &was_updated); g_assert_cmpint (n_captured_touch_events, ==, 4); g_signal_handlers_disconnect_by_func (stage, on_event_return_stop, &n_captured_touch_events);