summaryrefslogtreecommitdiff
path: root/src/lib/ecore_cocoa
diff options
context:
space:
mode:
authorJean Guyomarc'h <jean.guyomarch@openwide.fr>2015-10-15 14:02:44 +0200
committerCedric BAIL <cedric@osg.samsung.com>2015-12-01 12:15:32 -0800
commit907f14c0037cda21563cc284c26910a455765874 (patch)
tree7556620b7bf58b05f38e37f61999f40e1c2d8459 /src/lib/ecore_cocoa
parentaf19d15a783a6a73af69ca377c9302d8f22a5b28 (diff)
ecore_cocoa: NSApp must be configured in the App wrapper
Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
Diffstat (limited to 'src/lib/ecore_cocoa')
-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)
56 return nil; 56 return nil;
57 } 57 }
58 NSApp = self; // NSApp is used EVERYWHERE! Set it right now! 58 NSApp = self; // NSApp is used EVERYWHERE! Set it right now!
59
60 /* Set the process to be a foreground process,
61 * without that it prevents the window to become the key window and
62 * receive all mouse mouve events. */
63 [NSApp setActivationPolicy:NSApplicationActivationPolicyRegular];
64 [NSApp activateIgnoringOtherApps:YES];
65
59 return NSApp; 66 return NSApp;
60} 67}
61 68
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,
286 styleMask:style 286 styleMask:style
287 backing:NSBackingStoreBuffered 287 backing:NSBackingStoreBuffered
288 defer:NO]; 288 defer:NO];
289
290 if (EINA_UNLIKELY(!window)) 289 if (EINA_UNLIKELY(!window))
291 { 290 {
292 CRI("Failed to create EcoreCocoaWindow"); 291 CRI("Failed to create EcoreCocoaWindow");
293 return NULL; 292 return NULL;
294 } 293 }
295 294
296 //Set the process to be a foreground process,
297 //without that it prevents the window to become the key window and
298 //receive all mouse mouve events.
299 [NSApp setActivationPolicy:NSApplicationActivationPolicyRegular];
300 [NSApp activateIgnoringOtherApps:YES];
301
302
303 w = calloc(1, sizeof(Ecore_Cocoa_Window)); 295 w = calloc(1, sizeof(Ecore_Cocoa_Window));
304 if (EINA_UNLIKELY(w == NULL)) 296 if (EINA_UNLIKELY(w == NULL))
305 { 297 {