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 665817 - Change GApplication::startup to be run first, not run last
Change GApplication::startup to be run first, not run last
Status: RESOLVED FIXED
Product: glib
Classification: Platform
Component: gapplication
unspecified
Other Linux
: Normal normal
: ---
Assigned To: gtkdev
gtkdev
Depends on:
Blocks:
 
 
Reported: 2011-12-08 20:38 UTC by Giovanni Campagna
Modified: 2011-12-09 04:46 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
GApplication: Make ::startup run-first (950 bytes, patch)
2011-12-09 04:46 UTC, Matthias Clasen
committed Details | Review

Description Giovanni Campagna 2011-12-08 20:38:19 UTC
Currently, the class handler for startup runs after connected signals. Since signals connections are there to avoid overriding the virtual method, it makes sense to have them run after the existing implementations, so that base classes and libraries (in particular, gtk) are correctly initialized at the time 'startup' is called.
This is particularly important for GtkApplicationWindows created in a startup handler, as otherwise they're not correctly associated with the the GtkApplication (they don't have the relevant X11 properties, and their GtkApplicationWindowInfo is NULL, which causes a segfault on exit)

(A workaround is to connect_after, but I don't think that's the correct solution)
Comment 1 Allison Karlitskaya (desrt) 2011-12-08 22:35:52 UTC
Agreed.
Comment 2 Matthias Clasen 2011-12-09 04:46:42 UTC
The following fix has been pushed:
8d428e3 GApplication: Make ::startup run-first
Comment 3 Matthias Clasen 2011-12-09 04:46:45 UTC
Created attachment 203131 [details] [review]
GApplication: Make ::startup run-first