Skip to contentSkip to conversation

ui/cocoa: Make sure app is not starting in the background

PATCH New BALATON Zoltan 1 participant 1 message Feb 15, 2019

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ui/cocoa: Make sure app is not starting in the background

Activate app to make sure the window is brought to front e.g. when started from a terminal window.

---
This is on top of Peter's patches.

 ui/cocoa.m | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
ui/cocoa.m +2 -1
index 201a294ed4..4727f9c392 100644
@@ -1746,7 +1746,8 @@ int main (int argc, const char * argv[]) {
     QemuCocoaAppController *appController = [[QemuCocoaAppController alloc] init];
     [NSApp setDelegate:appController];
 
-    // Start the main event loop
+    // Activate app and start the main event loop
+    [NSApp activateIgnoringOtherApps:YES];
     COCOA_DEBUG("Main thread: entering OSX run loop\n");
     [NSApp run];
     COCOA_DEBUG("Main thread: left OSX run loop, exiting\n");
Signature · 1 line
2.13.7