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

Commit

Permalink
Merge pull request #404 from fungl164/chrome-focus
Browse files Browse the repository at this point in the history
Focus chrome window when launching Live Development
  • Loading branch information
redmunds committed Dec 20, 2013
2 parents f670b1e + 455dcd1 commit 6f69e83
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion appshell/appshell_extensions_mac.mm
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,7 @@ int32 OpenLiveBrowser(ExtensionString argURL, bool enableRemoteDebugging)
nil];

NSDictionary* appConfig = [NSDictionary dictionaryWithObject:parameters forKey:NSWorkspaceLaunchConfigurationArguments];
NSUInteger launchOptions = NSWorkspaceLaunchDefault | NSWorkspaceLaunchWithoutActivation | NSWorkspaceLaunchNewInstance;
NSUInteger launchOptions = NSWorkspaceLaunchDefault | NSWorkspaceLaunchNewInstance;

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

[liveBrowser activateWithOptions:NSApplicationActivateIgnoringOtherApps];

// Check for existing tab with url already loaded
for (GoogleChromeWindow* chromeWindow in [chromeApp windows]) {
for (GoogleChromeTab* tab in [chromeWindow tabs]) {
Expand Down

0 comments on commit 6f69e83

Please sign in to comment.