Browse Source

fix: respect the user's active app focus (#16400)

* 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:]
Shazron Abdullah 6 years ago
parent
commit
6da939629b
2 changed files with 2 additions and 2 deletions
  1. 1 1
      atom/browser/browser_mac.mm
  2. 1 1
      atom/browser/native_window_mac.mm

+ 1 - 1
atom/browser/browser_mac.mm

@@ -28,7 +28,7 @@ void Browser::SetShutdownHandler(base::Callback<bool()> handler) {
 }
 
 void Browser::Focus() {
-  [[AtomApplication sharedApplication] activateIgnoringOtherApps:YES];
+  [[AtomApplication sharedApplication] activateIgnoringOtherApps:NO];
 }
 
 void Browser::Hide() {

+ 1 - 1
atom/browser/native_window_mac.mm

@@ -521,7 +521,7 @@ void NativeWindowMac::Focus(bool focus) {
     return;
 
   if (focus) {
-    [[NSApplication sharedApplication] activateIgnoringOtherApps:YES];
+    [[NSApplication sharedApplication] activateIgnoringOtherApps:NO];
     [window_ makeKeyAndOrderFront:nil];
   } else {
     [window_ orderBack:nil];