From ded58b8e65ddc8cf938d1677eaf41960575fb98a Mon Sep 17 00:00:00 2001 From: Cheng Zhao Date: Sat, 27 Dec 2014 17:41:13 -0800 Subject: [PATCH] mac: BrowserWindow.show() should also focus on window --- atom/browser/native_window_mac.mm | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/atom/browser/native_window_mac.mm b/atom/browser/native_window_mac.mm index c57ceee97fb3..0f5b39ee5b33 100644 --- a/atom/browser/native_window_mac.mm +++ b/atom/browser/native_window_mac.mm @@ -386,6 +386,10 @@ bool NativeWindowMac::IsFocused() { } void NativeWindowMac::Show() { + // This method is supposed to put focus on window, however if the app does not + // have focus then "makeKeyAndOrderFront" will only show the window. + [NSApp activateIgnoringOtherApps:YES]; + [window_ makeKeyAndOrderFront:nil]; }