diff options
author | Philippe Normand <philn@igalia.com> | 2018-06-08 18:10:59 +0100 |
---|---|---|
committer | Philippe Normand <philn@igalia.com> | 2018-06-08 18:41:54 +0100 |
commit | 2f181df1cf3d1738c112e06d31ccfb83c11d4f2a (patch) | |
tree | f189ae8b0665e263bf47484bec5549557162d99e /testsuite | |
parent | 542ad4fdc579e689e3e0486e45f4ba7b0c6ee433 (diff) | |
download | gtk+-2f181df1cf3d1738c112e06d31ccfb83c11d4f2a.tar.gz |
gtkmain: Add gtk_get_main_thread()
This utility function can be useful to know which thread was initialized for
GTK+.
Diffstat (limited to 'testsuite')
-rw-r--r-- | testsuite/gtk/main.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/testsuite/gtk/main.c b/testsuite/gtk/main.c index dc5e249069..727ae032bb 100644 --- a/testsuite/gtk/main.c +++ b/testsuite/gtk/main.c @@ -4,9 +4,15 @@ static void test_init (void) { + GThread *self = g_thread_self (); + g_assert (gtk_is_initialized () == FALSE); + g_assert (gtk_get_main_thread () == NULL); + g_assert (gtk_init_check ()); g_assert (gtk_is_initialized () == TRUE); + + g_assert (gtk_get_main_thread () == self); } int |