diff options
author | David Robillard <d@drobilla.net> | 2013-04-21 21:37:37 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2013-04-21 21:37:37 +0000 |
commit | c1cf4a0aaa5742441eb3b0052844e9b3415a641b (patch) | |
tree | 0bb02e3e4fcb6c78fb2392c0cb63d1fab059b64f /src/x11_in_gtk2.c | |
parent | 5db4f44b621edcf957aa7bc194bc7de0aca4d5f5 (diff) | |
download | suil-c1cf4a0aaa5742441eb3b0052844e9b3415a641b.tar.gz suil-c1cf4a0aaa5742441eb3b0052844e9b3415a641b.tar.bz2 suil-c1cf4a0aaa5742441eb3b0052844e9b3415a641b.zip |
Correctly remove Gtk timeout callback (fix #901).
git-svn-id: http://svn.drobilla.net/lad/trunk/suil@5105 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/x11_in_gtk2.c')
-rw-r--r-- | src/x11_in_gtk2.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/x11_in_gtk2.c b/src/x11_in_gtk2.c index 13986ce..e2d9cea 100644 --- a/src/x11_in_gtk2.c +++ b/src/x11_in_gtk2.c @@ -34,6 +34,7 @@ struct _SuilX11Wrapper { SuilInstance* instance; #ifdef HAVE_LV2_1_4_1 const LV2UI_Idle_Interface* idle_iface; + guint idle_id; #endif }; @@ -51,7 +52,10 @@ on_plug_removed(GtkSocket* sock, gpointer data) SuilX11Wrapper* const self = SUIL_X11_WRAPPER(sock); #ifdef HAVE_LV2_1_4_1 - g_idle_remove_by_data(self); + if (self->idle_id) { + g_source_remove(self->idle_id); + self->idle_id = 0; + } #endif if (self->instance->handle) { @@ -197,7 +201,7 @@ wrapper_wrap(SuilWrapper* wrapper, instance, LV2_UI__idleInterface); if (idle_iface) { wrap->idle_iface = idle_iface; - g_timeout_add(1000/30, suil_x11_wrapper_idle, wrap); // 30 Hz + wrap->idle_id = g_timeout_add(1000/30, suil_x11_wrapper_idle, wrap); } #endif |