GNOME Bugzilla – Bug 724506
Do not animate and notify during destroy
Last modified: 2015-06-21 15:38:48 UTC
Created attachment 269335 [details] [review] patch This came up while implenenting a GPropertyAction based stack switcher: during the destruction phase we do not want to get notified about the current child not only because it is wasteful, but also because GPropertyAction does not like NULL when the stack is empty and I have no way to hook into that phase since the notification is emitted before my handler for container::remove can run. While at it the patch also has the side effect of preventing to run all the transition animations while we are shutting down
I think it might make sense if we disconnected all signal handlers as the first part of destroying any widget, but that change is probably too disruptive at this point in the cycle. Putting that aside, I think this patch makes sense -- even if only for the purpose of saving the work of setting up the animated transition each time we remove a child...
https://bugzilla.gnome.org/show_bug.cgi?id=723517 is the glib/gedit side of the bug triggering this patch
Review of attachment 269335 [details] [review]: ::: gtk/gtkstack.c @@ +898,3 @@ + * and notifications */ + if (priv->destroying) + return; no need to complicate things with a boolean flag: we have a private IN_DESTRUCTION flag for these cases.
Review of attachment 269335 [details] [review]: or, at least, we used to have an IN_DESTRUCTION flag which should have been used for these cases. apparently it's gone.
still there, gtkwidget.c:407
Review of attachment 269335 [details] [review]: setting status