After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 724506 - Do not animate and notify during destroy
Do not animate and notify during destroy
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: Widget: Other
unspecified
Other Linux
: Normal normal
: ---
Assigned To: gtk-bugs
gtk-bugs
Depends on:
Blocks:
 
 
Reported: 2014-02-16 21:42 UTC by Paolo Borelli
Modified: 2015-06-21 15:38 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
patch (2.81 KB, patch)
2014-02-16 21:42 UTC, Paolo Borelli
committed Details | Review

Description Paolo Borelli 2014-02-16 21:42:20 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
Comment 1 Allison Karlitskaya (desrt) 2014-02-16 21:49:34 UTC
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...
Comment 2 Paolo Borelli 2014-02-16 21:51:22 UTC
https://bugzilla.gnome.org/show_bug.cgi?id=723517 is the glib/gedit side of the bug triggering this patch
Comment 3 Emmanuele Bassi (:ebassi) 2014-02-17 18:52:45 UTC
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.
Comment 4 Emmanuele Bassi (:ebassi) 2014-02-17 18:55:20 UTC
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.
Comment 5 Matthias Clasen 2014-02-19 05:36:09 UTC
still there, gtkwidget.c:407
Comment 6 Matthias Clasen 2014-03-04 03:11:39 UTC
Review of attachment 269335 [details] [review]:

setting status