Merge pull request #57797 from bruvzg/mac_no_focus
This commit is contained in:
commit
b0fd01b50c
@ -125,6 +125,7 @@ DisplayServerOSX::WindowID DisplayServerOSX::_create_window(WindowMode p_mode, V
|
|||||||
backing:NSBackingStoreBuffered
|
backing:NSBackingStoreBuffered
|
||||||
defer:NO];
|
defer:NO];
|
||||||
ERR_FAIL_COND_V_MSG(wd.window_object == nil, INVALID_WINDOW_ID, "Can't create a window");
|
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];
|
wd.window_view = [[GodotContentView alloc] init];
|
||||||
ERR_FAIL_COND_V_MSG(wd.window_view == nil, INVALID_WINDOW_ID, "Can't create a window view");
|
ERR_FAIL_COND_V_MSG(wd.window_view == nil, INVALID_WINDOW_ID, "Can't create a window view");
|
||||||
|
@ -45,7 +45,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
- (BOOL)canBecomeKeyWindow {
|
- (BOOL)canBecomeKeyWindow {
|
||||||
// Required for NSBorderlessWindowMask windows.
|
// Required for NSWindowStyleMaskBorderless windows.
|
||||||
DisplayServerOSX *ds = (DisplayServerOSX *)DisplayServer::get_singleton();
|
DisplayServerOSX *ds = (DisplayServerOSX *)DisplayServer::get_singleton();
|
||||||
if (!ds || !ds->has_window(window_id)) {
|
if (!ds || !ds->has_window(window_id)) {
|
||||||
return YES;
|
return YES;
|
||||||
@ -56,7 +56,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
- (BOOL)canBecomeMainWindow {
|
- (BOOL)canBecomeMainWindow {
|
||||||
// Required for NSBorderlessWindowMask windows.
|
// Required for NSWindowStyleMaskBorderless windows.
|
||||||
DisplayServerOSX *ds = (DisplayServerOSX *)DisplayServer::get_singleton();
|
DisplayServerOSX *ds = (DisplayServerOSX *)DisplayServer::get_singleton();
|
||||||
if (!ds || !ds->has_window(window_id)) {
|
if (!ds || !ds->has_window(window_id)) {
|
||||||
return YES;
|
return YES;
|
||||||
|
Loading…
Reference in New Issue
Block a user