mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-11-14 20:51:07 +00:00
Add a little wait to focus tests
I don't know exactly why, but this seems to help the tests not fail on X11.
This commit is contained in:
parent
fcdcdb7e78
commit
ba64e5588d
@ -67,6 +67,26 @@ check_focus_states (GtkWidget *focus_widget)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static gboolean
|
||||||
|
quit_iteration_loop (gpointer user_data)
|
||||||
|
{
|
||||||
|
gboolean *keep_running = user_data;
|
||||||
|
|
||||||
|
*keep_running = FALSE;
|
||||||
|
|
||||||
|
return G_SOURCE_REMOVE;
|
||||||
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
wait (guint millis)
|
||||||
|
{
|
||||||
|
gboolean keep_running = TRUE;
|
||||||
|
|
||||||
|
g_timeout_add (millis, quit_iteration_loop, &keep_running);
|
||||||
|
while (keep_running)
|
||||||
|
g_main_context_iteration (NULL, TRUE);
|
||||||
|
}
|
||||||
|
|
||||||
static char *
|
static char *
|
||||||
generate_focus_chain (GtkWidget *window,
|
generate_focus_chain (GtkWidget *window,
|
||||||
GtkDirectionType dir)
|
GtkDirectionType dir)
|
||||||
@ -125,6 +145,7 @@ generate_focus_chain (GtkWidget *window,
|
|||||||
}
|
}
|
||||||
|
|
||||||
g_string_append_printf (output, "%s\n", name);
|
g_string_append_printf (output, "%s\n", name);
|
||||||
|
wait (100);
|
||||||
count++;
|
count++;
|
||||||
|
|
||||||
if (!first)
|
if (!first)
|
||||||
@ -170,16 +191,6 @@ get_dir_for_file (const char *path)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static gboolean
|
|
||||||
quit_iteration_loop (gpointer user_data)
|
|
||||||
{
|
|
||||||
gboolean *keep_running = user_data;
|
|
||||||
|
|
||||||
*keep_running = FALSE;
|
|
||||||
|
|
||||||
return G_SOURCE_REMOVE;
|
|
||||||
}
|
|
||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
load_ui_file (GFile *ui_file,
|
load_ui_file (GFile *ui_file,
|
||||||
GFile *ref_file,
|
GFile *ref_file,
|
||||||
|
Loading…
Reference in New Issue
Block a user