mirror of
https://github.com/brl/mutter.git
synced 2025-02-18 14:14:10 +00: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->context = nil;
|
||||||
backend_osx->pixel_format = 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
|
static void
|
||||||
|
@ -264,19 +264,6 @@ clutter_stage_osx_realize (ClutterStageWindow *stage_window)
|
|||||||
|
|
||||||
backend_osx = CLUTTER_BACKEND_OSX (self->backend);
|
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);
|
NSRect rect = NSMakeRect(0, 0, self->requisition_width, self->requisition_height);
|
||||||
|
|
||||||
self->view = [[ClutterGLView alloc]
|
self->view = [[ClutterGLView alloc]
|
||||||
|
Loading…
x
Reference in New Issue
Block a user