Add focusable option
This commit is contained in:
parent
5aecd10502
commit
8eca728e0a
11 changed files with 24 additions and 23 deletions
|
@ -490,6 +490,10 @@ NativeWindowMac::NativeWindowMac(
|
|||
NSWindowCollectionBehaviorIgnoresCycle)];
|
||||
}
|
||||
|
||||
bool focusable;
|
||||
if (options.Get(options::kFocusable, &focusable) && !focusable)
|
||||
[window_ setDisableKeyOrMainWindow:YES];
|
||||
|
||||
// Remove non-transparent corners, see http://git.io/vfonD.
|
||||
if (!has_frame())
|
||||
[window_ setOpaque:NO];
|
||||
|
@ -883,10 +887,6 @@ void NativeWindowMac::SetIgnoreMouseEvents(bool ignore) {
|
|||
[window_ setIgnoresMouseEvents:ignore];
|
||||
}
|
||||
|
||||
void NativeWindowMac::SetIgnoreFocus(bool ignore) {
|
||||
[window_ setDisableKeyOrMainWindow:ignore];
|
||||
}
|
||||
|
||||
bool NativeWindowMac::HasModalDialog() {
|
||||
return [window_ attachedSheet] != nil;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue