diff options
author | Matthias Clasen <mclasen@redhat.com> | 2023-04-16 09:11:24 +0200 |
---|---|---|
committer | Matthias Clasen <mclasen@redhat.com> | 2023-04-16 09:11:24 +0200 |
commit | 585fb497c122a6a84389b3660dcaba196d61adca (patch) | |
tree | 658398854d93c0b1b58fe46bd9516e2833d1409f /testsuite | |
parent | c57e5811f1dabcb6f46082ee97a12e18f1c8f033 (diff) | |
download | gtk+-585fb497c122a6a84389b3660dcaba196d61adca.tar.gz |
testsuite: Actually wait for focus
We were failing to properly iterate the main
context here. Oops.
Diffstat (limited to 'testsuite')
-rw-r--r-- | testsuite/gtk/test-focus-chain.c | 10 |
1 files changed, 5 insertions, 5 deletions
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; |