Skip to content
This repository was archived by the owner on Sep 2, 2021. It is now read-only.

Commit 6f69e83

Browse files
committed
Merge pull request #404 from fungl164/chrome-focus
Focus chrome window when launching Live Development
2 parents f670b1e + 455dcd1 commit 6f69e83

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

appshell/appshell_extensions_mac.mm

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -263,7 +263,7 @@ int32 OpenLiveBrowser(ExtensionString argURL, bool enableRemoteDebugging)
263263
nil];
264264

265265
NSDictionary* appConfig = [NSDictionary dictionaryWithObject:parameters forKey:NSWorkspaceLaunchConfigurationArguments];
266-
NSUInteger launchOptions = NSWorkspaceLaunchDefault | NSWorkspaceLaunchWithoutActivation | NSWorkspaceLaunchNewInstance;
266+
NSUInteger launchOptions = NSWorkspaceLaunchDefault | NSWorkspaceLaunchNewInstance;
267267

268268
liveBrowser = [[NSWorkspace sharedWorkspace] launchApplicationAtURL:appURL options:launchOptions configuration:appConfig error:nil];
269269
if (!liveBrowser) {
@@ -276,6 +276,8 @@ int32 OpenLiveBrowser(ExtensionString argURL, bool enableRemoteDebugging)
276276
return NO_ERROR;
277277
}
278278

279+
[liveBrowser activateWithOptions:NSApplicationActivateIgnoringOtherApps];
280+
279281
// Check for existing tab with url already loaded
280282
for (GoogleChromeWindow* chromeWindow in [chromeApp windows]) {
281283
for (GoogleChromeTab* tab in [chromeWindow tabs]) {

0 commit comments

Comments
 (0)