ecore_cocoa: NSApp must be configured in the App wrapper

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
This commit is contained in:
Jean Guyomarc'h 2015-10-15 14:02:44 +02:00 committed by Cedric BAIL
parent af19d15a78
commit 907f14c003
2 changed files with 7 additions and 8 deletions

View File

@ -56,6 +56,13 @@ _ecore_cocoa_run_loop_cb(void *data EINA_UNUSED)
return nil;
}
NSApp = self; // NSApp is used EVERYWHERE! Set it right now!
/* Set the process to be a foreground process,
* without that it prevents the window to become the key window and
* receive all mouse mouve events. */
[NSApp setActivationPolicy:NSApplicationActivationPolicyRegular];
[NSApp activateIgnoringOtherApps:YES];
return NSApp;
}

View File

@ -286,20 +286,12 @@ ecore_cocoa_window_new(int x,
styleMask:style
backing:NSBackingStoreBuffered
defer:NO];
if (EINA_UNLIKELY(!window))
{
CRI("Failed to create EcoreCocoaWindow");
return NULL;
}
//Set the process to be a foreground process,
//without that it prevents the window to become the key window and
//receive all mouse mouve events.
[NSApp setActivationPolicy:NSApplicationActivationPolicyRegular];
[NSApp activateIgnoringOtherApps:YES];
w = calloc(1, sizeof(Ecore_Cocoa_Window));
if (EINA_UNLIKELY(w == NULL))
{