diff options
author | Emmanuele Bassi <ebassi@gnome.org> | 2018-02-02 15:08:02 +0100 |
---|---|---|
committer | Emmanuele Bassi <ebassi@gnome.org> | 2018-02-03 12:06:58 +0100 |
commit | 334acbfc39cc08869932ec046e4d13e6c4b64be6 (patch) | |
tree | 006f9525b16e22231dde569193617bc62182ccda /gtk/gtkmenusectionbox.c | |
parent | dfc131c7ecf93287caef22ddac9b37b4825b2cf5 (diff) | |
download | gtk+-334acbfc39cc08869932ec046e4d13e6c4b64be6.tar.gz |
Replace gdk_threads_add_idle* with g_idle_add()
The main GDK thread lock is not portable and deprecated.
The only reason why gdk_threads_add_idle() and
gdk_threads_add_idle_full() exist is to allow invoking a callback with
the GDK lock held, in case 3rd party libraries still use the deprecated
gdk_threads_enter()/gdk_threads_leave() API.
Since we're removing the GDK lock, and we're releasing a new major API,
such code cannot exist any more; this means we can use the GLib API for
installing idle callbacks.
https://bugzilla.gnome.org/show_bug.cgi?id=793124
Diffstat (limited to 'gtk/gtkmenusectionbox.c')
-rw-r--r-- | gtk/gtkmenusectionbox.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/gtk/gtkmenusectionbox.c b/gtk/gtkmenusectionbox.c index 3179290142..2e56e0157c 100644 --- a/gtk/gtkmenusectionbox.c +++ b/gtk/gtkmenusectionbox.c @@ -160,9 +160,12 @@ gtk_menu_section_box_schedule_separator_sync (GtkMenuSectionBox *box) box = box->toplevel; if (!box->separator_sync_idle) - box->separator_sync_idle = gdk_threads_add_idle_full (G_PRIORITY_HIGH_IDLE, /* before resize... */ - gtk_menu_section_box_handle_sync_separators, - box, NULL); + { + box->separator_sync_idle = g_idle_add_full (G_PRIORITY_HIGH_IDLE, /* before resize... */ + gtk_menu_section_box_handle_sync_separators, + box, NULL); + g_source_set_name_by_id (box->separator_sync_idle, "[gtk+] menu section box handle sync separators"); + } } static void |