GNOME Bugzilla – Bug 723771
gtkwindow: remove delete-event idle function on finalize
Last modified: 2014-02-06 16:19:21 UTC
A busy main loop can prevent the delete-event idle function from being executed before the window is actually destroyed, causing applications to crash.
Created attachment 268301 [details] [review] gtkwindow: remove delete-event idle function on finalize Heavy duty can prevent this idle function from being called before the window is destroyed, so make sure that the source is removed when the window is finalized.
I'd prefer to use g_signal_handlers_disconnect_by_func instead of storing the id
or alternatively, use g_signal_connect_object
g_source_remove_by_funcs_user_data() only removes one source, so I'm afraid that we might still be left with other sources dangling (say, if a user presses Esc many times in a dialog). Also note that this is not signal handler but a GSource, so the connect_object() approach won't do it.
Indeed, using g_source_remove_by_funcs_user_data() I still manage to get ephy to crash.
Attachment 268301 [details] pushed as b91859a - gtkwindow: remove delete-event idle function on finalize