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

Focus chrome window when launching Live Development #404

Merged
merged 1 commit into from
Dec 20, 2013
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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