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 668801 - [NSApp finishLaunching]; missing in OSX backend
[NSApp finishLaunching]; missing in OSX backend
Status: RESOLVED FIXED
Product: clutter
Classification: Platform
Component: ClutterStage
1.9.x
Other Mac OS
: Normal normal
: ---
Assigned To: clutter-maint
clutter-maint
Depends on:
Blocks:
 
 
Reported: 2012-01-27 06:08 UTC by Roland Peffer
Modified: 2012-03-06 15:45 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
osx: Call finishLaunching on post-parse (841 bytes, patch)
2012-01-27 12:30 UTC, Emmanuele Bassi (:ebassi)
committed Details | Review

Description Roland Peffer 2012-01-27 06:08:17 UTC
Please call [NSApp finishLaunching]; once on the start of the event loop to enable support for the standard Apple Application behavior. Without this call Adding Menus or Application Delegate will not work.

I fixed it in clutter-event-loop like this:
-----
static gboolean bfinished_launching = FALSE;

static gint
poll_func (GPollFD *ufds,
       guint    nfds,
       gint     timeout_)
{
  NSEvent *event;
  NSDate *limit_date;
  gint n_ready;
  if(!bfinished_launching)
  { bfinished_launching = TRUE;
    [NSApp finishLaunching];
  }

...

------
Reference about OSX App Run loop internal: http://cocoawithlove.com/2009/01/demystifying-nsapplication-by.html
Comment 1 Emmanuele Bassi (:ebassi) 2012-01-27 12:30:19 UTC
Created attachment 206257 [details] [review]
osx: Call finishLaunching on post-parse
Comment 2 Emmanuele Bassi (:ebassi) 2012-01-27 12:33:07 UTC
I'd rather have the Backend emit finishLaunching at the correct place in the initialization sequence, instead of doing so in the event loop.

I don't want to modify the Quartz event-loop too much, to avoid issues when resynchronising it with the original in gtk.
Comment 3 Emmanuele Bassi (:ebassi) 2012-01-27 12:34:43 UTC
I just checked in gtk+, and the new GtkApplication class calls finishLaunching during the session startup sequence.

at this point, having a ClutterApplication may be a good idea.
Comment 4 Emmanuele Bassi (:ebassi) 2012-03-06 15:45:14 UTC
Attachment 206257 [details] pushed as 0581387 - osx: Call finishLaunching on post-parse