testsuite: Actually wait for focus

We were failing to properly iterate the main
context here. Oops.
This commit is contained in:
Matthias Clasen 2023-04-16 09:11:24 +02:00
parent c57e5811f1
commit 585fb497c1

View File

@ -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;