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.mm9
1 files changed, 9 insertions, 0 deletions
diff --git a/platform/macos/godot_window_delegate.mm b/platform/macos/godot_window_delegate.mm
index 3bdbc8c5ec..27efd3ebb2 100644
--- a/platform/macos/godot_window_delegate.mm
+++ b/platform/macos/godot_window_delegate.mm
@@ -256,6 +256,15 @@
}
}
+- (void)windowDidChangeScreen:(NSNotification *)notification {
+ DisplayServerMacOS *ds = (DisplayServerMacOS *)DisplayServer::get_singleton();
+ if (!ds || !ds->has_window(window_id)) {
+ return;
+ }
+
+ ds->reparent_check(window_id);
+}
+
- (void)windowDidMove:(NSNotification *)notification {
DisplayServerMacOS *ds = (DisplayServerMacOS *)DisplayServer::get_singleton();
if (!ds || !ds->has_window(window_id)) {