Focusing on window should also focus on application.

This commit is contained in:
Cheng Zhao 2013-05-25 15:08:58 +08:00
parent 4a79842c4c
commit 39bd56af4c

View file

@ -150,10 +150,12 @@ void NativeWindowMac::Move(const gfx::Rect& pos) {
}
void NativeWindowMac::Focus(bool focus) {
if (focus && [window() isVisible])
if (focus && [window() isVisible]) {
[[NSApplication sharedApplication] activateIgnoringOtherApps:YES];
[window() makeKeyAndOrderFront:nil];
else
} else {
[window() orderBack:nil];
}
}
bool NativeWindowMac::IsFocused() {