summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/cocoa
diff options
context:
space:
mode:
authorTor Arne Vestbø <tor.arne.vestbo@qt.io>2023-08-16 12:45:22 +0200
committerTor Arne Vestbø <tor.arne.vestbo@qt.io>2023-08-23 12:48:20 +0200
commita143158eb12c398c756532aaec58340ec980b44d (patch)
treeb2def74463005956fb033827b23b80035da98e9f /src/plugins/platforms/cocoa
parent3aaeef59fba8e8c6cf168a26cffc054375c7c21b (diff)
macOS: Re-apply QWindow visibility when moved between NSWindows
When a QWindow is moved between being a child window and a top level, it gains a corresponding QNSWindow, which we create as part of QCocoaWindow::createNSWindow(). NSWindows are not visible by default, so we need to re-apply the QWindow state to the newly created window, just like we do for other QWindow properties. Pick-to: 6.6 Change-Id: I809d12b09eeccea7a4ee4e8444f69db46dbd159e Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Diffstat (limited to 'src/plugins/platforms/cocoa')
-rw-r--r--src/plugins/platforms/cocoa/qnswindow.mm1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/plugins/platforms/cocoa/qnswindow.mm b/src/plugins/platforms/cocoa/qnswindow.mm
index da3979882a..36666c87b7 100644
--- a/src/plugins/platforms/cocoa/qnswindow.mm
+++ b/src/plugins/platforms/cocoa/qnswindow.mm
@@ -225,6 +225,7 @@ NSWindow<QNSWindowProtocol> *qnswindow_cast(NSWindow *window)
m_platformWindow->setWindowFilePath(window->filePath()); // Also sets window icon
m_platformWindow->setWindowState(window->windowState());
m_platformWindow->setOpacity(window->opacity());
+ m_platformWindow->setVisible(window->isVisible());
}
- (NSString *)description