aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJean Guyomarc'h <jean.guyomarch@openwide.fr>2015-10-15 14:02:44 +0200
committerChris Michael <cp.michael@samsung.com>2015-12-03 11:31:06 -0500
commit5e1c9268189c9df2c1a4068ec6441d8fa7d0a1e2 (patch)
tree15b6ebe8601fa2952123567342a23f39a34e6a0a
parentecore_cocoa_window: cosmetic changes (diff)
downloadefl-5e1c9268189c9df2c1a4068ec6441d8fa7d0a1e2.tar.gz
ecore_cocoa: NSApp must be configured in the App wrapper
Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
-rw-r--r--src/lib/ecore_cocoa/ecore_cocoa_app.m7
-rw-r--r--src/lib/ecore_cocoa/ecore_cocoa_window.m8
2 files changed, 7 insertions, 8 deletions
diff --git a/src/lib/ecore_cocoa/ecore_cocoa_app.m b/src/lib/ecore_cocoa/ecore_cocoa_app.m
index bb74d53e2c..648bf872af 100644
--- a/src/lib/ecore_cocoa/ecore_cocoa_app.m
+++ b/src/lib/ecore_cocoa/ecore_cocoa_app.m
@@ -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;
}
diff --git a/src/lib/ecore_cocoa/ecore_cocoa_window.m b/src/lib/ecore_cocoa/ecore_cocoa_window.m
index 670b530bbd..e4c904e02e 100644
--- a/src/lib/ecore_cocoa/ecore_cocoa_window.m
+++ b/src/lib/ecore_cocoa/ecore_cocoa_window.m
@@ -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))
{