summaryrefslogtreecommitdiff
path: root/platform/macos/godot_window_delegate.mm
diff options
context:
space:
mode:
Diffstat (limited to 'platform/macos/godot_window_delegate.mm')
-rw-r--r--platform/macos/godot_window_delegate.mm11
1 files changed, 11 insertions, 0 deletions
diff --git a/platform/macos/godot_window_delegate.mm b/platform/macos/godot_window_delegate.mm
index f7f16b1e0e..94d40924b2 100644
--- a/platform/macos/godot_window_delegate.mm
+++ b/platform/macos/godot_window_delegate.mm
@@ -77,10 +77,16 @@
DisplayServerMacOS::WindowData &wd = ds->get_window(window_id);
wd.fullscreen = true;
+
// Reset window size limits.
[wd.window_object setContentMinSize:NSMakeSize(0, 0)];
[wd.window_object setContentMaxSize:NSMakeSize(FLT_MAX, FLT_MAX)];
+ // Reset custom window buttons.
+ if ([wd.window_object styleMask] & NSWindowStyleMaskFullSizeContentView) {
+ ds->window_set_custom_window_buttons(wd, false);
+ }
+
// Force window resize event.
[self windowDidResize:notification];
}
@@ -105,6 +111,11 @@
[wd.window_object setContentMaxSize:NSMakeSize(size.x, size.y)];
}
+ // Restore custom window buttons.
+ if ([wd.window_object styleMask] & NSWindowStyleMaskFullSizeContentView) {
+ ds->window_set_custom_window_buttons(wd, true);
+ }
+
// Restore resizability state.
if (wd.resize_disabled) {
[wd.window_object setStyleMask:[wd.window_object styleMask] & ~NSWindowStyleMaskResizable];