Focusing on window should also focus on application.
This commit is contained in:
parent
4a79842c4c
commit
39bd56af4c
1 changed files with 4 additions and 2 deletions
|
@ -150,10 +150,12 @@ void NativeWindowMac::Move(const gfx::Rect& pos) {
|
||||||
}
|
}
|
||||||
|
|
||||||
void NativeWindowMac::Focus(bool focus) {
|
void NativeWindowMac::Focus(bool focus) {
|
||||||
if (focus && [window() isVisible])
|
if (focus && [window() isVisible]) {
|
||||||
|
[[NSApplication sharedApplication] activateIgnoringOtherApps:YES];
|
||||||
[window() makeKeyAndOrderFront:nil];
|
[window() makeKeyAndOrderFront:nil];
|
||||||
else
|
} else {
|
||||||
[window() orderBack:nil];
|
[window() orderBack:nil];
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
bool NativeWindowMac::IsFocused() {
|
bool NativeWindowMac::IsFocused() {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue