diff options
author | Carlos Garnacho <carlosg@gnome.org> | 2018-01-19 18:47:21 +0100 |
---|---|---|
committer | Carlos Garnacho <carlosg@gnome.org> | 2018-01-19 18:47:21 +0100 |
commit | 7d9af6d700a56f5f6c5858a64b1bf98bbea4757a (patch) | |
tree | 3f069b71dff32041eec799f24e88030c475078b8 /gtk/gtkwindow.c | |
parent | 8f4e0705dc0f9dca0d3db019c2eac4089aba022e (diff) | |
download | gtk+-7d9af6d700a56f5f6c5858a64b1bf98bbea4757a.tar.gz |
gtkwindow: Disconnect GdkSeat::device-removed callback on finalize
Otherwise dangling callbacks may lead to crashes.
Diffstat (limited to 'gtk/gtkwindow.c')
-rw-r--r-- | gtk/gtkwindow.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/gtk/gtkwindow.c b/gtk/gtkwindow.c index d82d7da67e..147e505058 100644 --- a/gtk/gtkwindow.c +++ b/gtk/gtkwindow.c @@ -6027,6 +6027,10 @@ gtk_window_finalize (GObject *object) priv->keys_changed_handler = 0; } + g_signal_handlers_disconnect_by_func (gdk_display_get_default_seat (priv->display), + device_removed_cb, + window); + #ifdef GDK_WINDOWING_X11 g_signal_handlers_disconnect_by_func (gtk_settings_get_for_display (priv->display), gtk_window_on_theme_variant_changed, |