[macOS] Fix NO_FOCUS macOS flag.

This commit is contained in:
bruvzg 2022-02-08 13:22:03 +02:00
parent f425d403fe
commit 720fbe3101
No known key found for this signature in database
GPG Key ID: 7960FCF39844EC38
2 changed files with 3 additions and 2 deletions

View File

@ -125,6 +125,7 @@ DisplayServerOSX::WindowID DisplayServerOSX::_create_window(WindowMode p_mode, V
backing:NSBackingStoreBuffered
defer:NO];
ERR_FAIL_COND_V_MSG(wd.window_object == nil, INVALID_WINDOW_ID, "Can't create a window");
[wd.window_object setWindowID:window_id_counter];
wd.window_view = [[GodotContentView alloc] init];
ERR_FAIL_COND_V_MSG(wd.window_view == nil, INVALID_WINDOW_ID, "Can't create a window view");

View File

@ -45,7 +45,7 @@
}
- (BOOL)canBecomeKeyWindow {
// Required for NSBorderlessWindowMask windows.
// Required for NSWindowStyleMaskBorderless windows.
DisplayServerOSX *ds = (DisplayServerOSX *)DisplayServer::get_singleton();
if (!ds || !ds->has_window(window_id)) {
return YES;
@ -56,7 +56,7 @@
}
- (BOOL)canBecomeMainWindow {
// Required for NSBorderlessWindowMask windows.
// Required for NSWindowStyleMaskBorderless windows.
DisplayServerOSX *ds = (DisplayServerOSX *)DisplayServer::get_singleton();
if (!ds || !ds->has_window(window_id)) {
return YES;