mirror of
https://github.com/electron/electron.git
synced 2026-05-02 03:00:22 -04:00
BrowserWindow.focus() should not make window become visible, fixed #106.
This commit is contained in:
@@ -209,7 +209,10 @@ void NativeWindowMac::Move(const gfx::Rect& pos) {
|
||||
}
|
||||
|
||||
void NativeWindowMac::Focus(bool focus) {
|
||||
if (focus && [window() isVisible]) {
|
||||
if (!IsVisible())
|
||||
return;
|
||||
|
||||
if (focus) {
|
||||
[[NSApplication sharedApplication] activateIgnoringOtherApps:YES];
|
||||
[window() makeKeyAndOrderFront:nil];
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user