diff options
author | Emmanuele Bassi <ebassi@gnome.org> | 2018-02-02 15:51:47 +0100 |
---|---|---|
committer | Emmanuele Bassi <ebassi@gnome.org> | 2018-02-03 12:06:58 +0100 |
commit | c655759cefa56efdb0cb943bb5dada3ff75a963c (patch) | |
tree | ef945ea7131b6419d00828fa8661d86691563d83 /gdk/wayland | |
parent | 334acbfc39cc08869932ec046e4d13e6c4b64be6 (diff) | |
download | gtk+-c655759cefa56efdb0cb943bb5dada3ff75a963c.tar.gz |
Replace gdk_threads_add_timeout* with g_timeout_add()
The main GDK thread lock is not portable and deprecated.
The only reason why gdk_threads_add_timeout() and
gdk_threads_add_timeout_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 timeout callbacks.
https://bugzilla.gnome.org/show_bug.cgi?id=793124
Diffstat (limited to 'gdk/wayland')
-rw-r--r-- | gdk/wayland/gdkdevice-wayland.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/gdk/wayland/gdkdevice-wayland.c b/gdk/wayland/gdkdevice-wayland.c index 4dde62229f..a17d531ddd 100644 --- a/gdk/wayland/gdkdevice-wayland.c +++ b/gdk/wayland/gdkdevice-wayland.c @@ -2076,8 +2076,7 @@ deliver_key_event (GdkWaylandSeat *seat, timeout = (seat->repeat_deadline - now) / 1000L; - seat->repeat_timer = - gdk_threads_add_timeout (timeout, keyboard_repeat, seat); + seat->repeat_timer = g_timeout_add (timeout, keyboard_repeat, seat); g_source_set_name_by_id (seat->repeat_timer, "[gtk+] keyboard_repeat"); } |