mirror of
https://github.com/brl/mutter.git
synced 2024-11-26 10:00:45 -05:00
osx: Fixed problem with freezing application while checking behaviour.
Problem was in incorrect application initialization. [NSApplication sharedApplication] should be call in backend init(not in init stage). It doesn't require any data and only makes a connection to window server.
This commit is contained in:
parent
8c69a639cb
commit
8e2b45648f
@ -161,6 +161,19 @@ clutter_backend_osx_init (ClutterBackendOSX *backend_osx)
|
||||
{
|
||||
backend_osx->context = nil;
|
||||
backend_osx->pixel_format = nil;
|
||||
|
||||
/* Bring our app to foreground, background apps don't appear in dock or
|
||||
* accept keyboard focus.
|
||||
*/
|
||||
const ProcessSerialNumber psn = { 0, kCurrentProcess };
|
||||
TransformProcessType (&psn, kProcessTransformToForegroundApplication);
|
||||
|
||||
/* Also raise our app to front, otherwise our window will remain under the
|
||||
* terminal.
|
||||
*/
|
||||
SetFrontProcess (&psn);
|
||||
|
||||
[NSApplication sharedApplication];
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -264,19 +264,6 @@ clutter_stage_osx_realize (ClutterStageWindow *stage_window)
|
||||
|
||||
backend_osx = CLUTTER_BACKEND_OSX (self->backend);
|
||||
|
||||
/* Bring our app to foreground, background apps don't appear in dock or
|
||||
* accept keyboard focus.
|
||||
*/
|
||||
const ProcessSerialNumber psn = { 0, kCurrentProcess };
|
||||
TransformProcessType (&psn, kProcessTransformToForegroundApplication);
|
||||
|
||||
/* Also raise our app to front, otherwise our window will remain under the
|
||||
* terminal.
|
||||
*/
|
||||
SetFrontProcess (&psn);
|
||||
|
||||
[NSApplication sharedApplication];
|
||||
|
||||
NSRect rect = NSMakeRect(0, 0, self->requisition_width, self->requisition_height);
|
||||
|
||||
self->view = [[ClutterGLView alloc]
|
||||
|
Loading…
Reference in New Issue
Block a user