BrowserWindow.focus() should not make window become visible, fixed #106.

This commit is contained in:
Cheng Zhao 2013-10-03 09:39:17 +08:00
parent 88ce2a5390
commit bbb9c37f70
2 changed files with 12 additions and 1 deletions

View file

@ -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 {