On Jun 15, 2013, at 4:16 AM, Andrius <andriusr yahoo com> wrote:
Ah, that makes sense. Thanks for finding it. To expand a bit for Olivier's benefit: [NSApplication finishLaunching] is normally called by Cocoa at the same time as starting the runloop (OSX's name for mainloop), and the OpenFile notification depends upon the regular event polling and dispatching, which ordinarily begins in a Gtk app when you call gtk_main(). Apple doesn't share that code, so we have to guess what they're doing, and one possibility is that they're stepping through the first iteration in order to issue those notifications in the right sequence. On Jun 15, 2013, at 6:15 AM, Olivier Sessink <oliviersessink gmail com> wrote:
From the gedit example it would seem that starting gtk_main() before calling gtkosx_application_ready() might cause the OpenFile event to get dispatched before the GtkApplicationDelegate is ready for it and for it to be lost. If you really need to have the mainloop running before calling gtkosx_application_ready() the gedit hack is probably the best solution. Regards, John Ralls |