GNOME Bugzilla – Bug 665817
Change GApplication::startup to be run first, not run last
Last modified: 2011-12-09 04:46:45 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)
Agreed.
The following fix has been pushed: 8d428e3 GApplication: Make ::startup run-first
Created attachment 203131 [details] [review] GApplication: Make ::startup run-first