From 585fb497c122a6a84389b3660dcaba196d61adca Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Sun, 16 Apr 2023 09:11:24 +0200 Subject: testsuite: Actually wait for focus We were failing to properly iterate the main context here. Oops. --- testsuite/gtk/test-focus-chain.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'testsuite') diff --git a/testsuite/gtk/test-focus-chain.c b/testsuite/gtk/test-focus-chain.c index 3846ac525d..0ab28caee9 100644 --- a/testsuite/gtk/test-focus-chain.c +++ b/testsuite/gtk/test-focus-chain.c @@ -208,14 +208,14 @@ load_ui_file (GFile *ui_file, timeout_handle_id = g_timeout_add (2000, quit_iteration_loop, &keep_running); - while (keep_running) - { - if (!g_main_context_iteration (NULL, FALSE)) - break; - } + while (keep_running && !gtk_window_is_active (GTK_WINDOW (window))) + g_main_context_iteration (NULL, TRUE); + if (keep_running) g_source_remove (timeout_handle_id); + g_assert (gtk_window_is_active (GTK_WINDOW (window))); + if (ext) { int i; -- cgit v1.2.1