summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJean Guyomarc'h <jean.guyomarch@openwide.fr>2015-10-15 14:02:44 +0200
committerNicolas Aguirre <aguirre.nicolas@gmail.com>2015-11-10 08:32:49 +0100
commit60e2a6cbbb5ca4013eb9a3b2deba054c3b9a681b (patch)
treed5704fac054d34189449b2bc637e49ef416abf1d
parent267c8ea18a59ea08440002de35ad895ad8403bf9 (diff)
ecore_cocoa: NSApp must be configured in the App wrapper
-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 {