summaryrefslogtreecommitdiff
path: root/gdk
diff options
context:
space:
mode:
authorEmmanuele Bassi <ebassi@gnome.org>2018-02-02 15:08:02 +0100
committerEmmanuele Bassi <ebassi@gnome.org>2018-02-03 12:06:58 +0100
commit334acbfc39cc08869932ec046e4d13e6c4b64be6 (patch)
tree006f9525b16e22231dde569193617bc62182ccda /gdk
parentdfc131c7ecf93287caef22ddac9b37b4825b2cf5 (diff)
downloadgtk+-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 'gdk')
-rw-r--r--gdk/broadway/gdkwindow-broadway.c2
-rw-r--r--gdk/quartz/gdkscreen-quartz.c2
-rw-r--r--gdk/x11/gdkasync.c4
3 files changed, 4 insertions, 4 deletions
diff --git a/gdk/broadway/gdkwindow-broadway.c b/gdk/broadway/gdkwindow-broadway.c
index 12fb5256e3..ebbd03e658 100644
--- a/gdk/broadway/gdkwindow-broadway.c
+++ b/gdk/broadway/gdkwindow-broadway.c
@@ -115,7 +115,7 @@ queue_flush (GdkWindow *window)
{
if (flush_id == 0)
{
- flush_id = gdk_threads_add_idle (flush_idle, NULL);
+ flush_id = g_idle_add (flush_idle, NULL);
g_source_set_name_by_id (flush_id, "[gtk+] flush_idle");
}
}
diff --git a/gdk/quartz/gdkscreen-quartz.c b/gdk/quartz/gdkscreen-quartz.c
index e1f12995cd..6f53f36a2b 100644
--- a/gdk/quartz/gdkscreen-quartz.c
+++ b/gdk/quartz/gdkscreen-quartz.c
@@ -262,7 +262,7 @@ display_reconfiguration_callback (CGDirectDisplayID display,
*/
if (!screen->screen_changed_id)
{
- screen->screen_changed_id = gdk_threads_add_idle (screen_changed_idle, screen);
+ screen->screen_changed_id = g_idle_add (screen_changed_idle, screen);
g_source_set_name_by_id (screen->screen_changed_id, "[gtk+] screen_changed_idle");
}
}
diff --git a/gdk/x11/gdkasync.c b/gdk/x11/gdkasync.c
index d9b84c4af2..31d5b4e480 100644
--- a/gdk/x11/gdkasync.c
+++ b/gdk/x11/gdkasync.c
@@ -173,7 +173,7 @@ send_event_handler (Display *dpy,
if (state->callback)
{
guint id;
- id = gdk_threads_add_idle (callback_idle, state);
+ id = g_idle_add (callback_idle, state);
g_source_set_name_by_id (id, "[gtk+] callback_idle");
}
@@ -709,7 +709,7 @@ roundtrip_handler (Display *dpy,
if (state->callback)
{
guint id;
- id = gdk_threads_add_idle (roundtrip_callback_idle, state);
+ id = g_idle_add (roundtrip_callback_idle, state);
g_source_set_name_by_id (id, "[gtk+] roundtrip_callback_idle");
}