Skip to content

Commit

Permalink
fix: respect the user's active app focus (#16400)
Browse files Browse the repository at this point in the history
* Respect the user's active app

Apple recommends not setting this to true. https://developer.apple.com/documentation/appkit/nsapplication/1428468-activateignoringotherapps?language=objc

* Remove atom_bundle_mover.mm change for [NSApp activateIgnoringOtherApps:]
  • Loading branch information
shazron authored and MarshallOfSound committed Feb 26, 2019
1 parent 5e762d6 commit 6da9396
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion atom/browser/browser_mac.mm
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
}

void Browser::Focus() {
[[AtomApplication sharedApplication] activateIgnoringOtherApps:YES];
[[AtomApplication sharedApplication] activateIgnoringOtherApps:NO];
}

void Browser::Hide() {
Expand Down
2 changes: 1 addition & 1 deletion atom/browser/native_window_mac.mm
Original file line number Diff line number Diff line change
Expand Up @@ -521,7 +521,7 @@ void ViewDidMoveToSuperview(NSView* self, SEL _cmd) {
return;

if (focus) {
[[NSApplication sharedApplication] activateIgnoringOtherApps:YES];
[[NSApplication sharedApplication] activateIgnoringOtherApps:NO];
[window_ makeKeyAndOrderFront:nil];
} else {
[window_ orderBack:nil];
Expand Down

0 comments on commit 6da9396

Please sign in to comment.