summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/cocoa
diff options
context:
space:
mode:
authorTor Arne Vestbø <tor.arne.vestbo@qt.io>2020-07-21 14:15:05 +0200
committerTor Arne Vestbø <tor.arne.vestbo@qt.io>2020-07-22 10:47:59 +0000
commitac9497a0efc2a56864012d824aa78035dea1c222 (patch)
treea030b20d4f8df35bd287d99c09cfc5af0fd1c5ca /src/plugins/platforms/cocoa
parenta54639acd2fea34836246c821fafe571bd465c79 (diff)
macOS: Remove stale code for handling view hiding during reparenting
Commit a2bdda8e3ba added an unconditional hide of child NSViews, which was found to be too strict, and worked around in a199a87ad by undoing the hide during setParent(). The unconditional hide was then changed in 89842b97d7 to use the visibility state of the window, which means the workaround in a199a87ad is no longer needed. Change-Id: If0df2de65693e03c5fb53a906b1399accab3fcc4 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Diffstat (limited to 'src/plugins/platforms/cocoa')
-rw-r--r--src/plugins/platforms/cocoa/qcocoawindow.mm6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/plugins/platforms/cocoa/qcocoawindow.mm b/src/plugins/platforms/cocoa/qcocoawindow.mm
index af490d49b5..34e60e938f 100644
--- a/src/plugins/platforms/cocoa/qcocoawindow.mm
+++ b/src/plugins/platforms/cocoa/qcocoawindow.mm
@@ -1105,11 +1105,9 @@ void QCocoaWindow::setParent(const QPlatformWindow *parentWindow)
{
qCDebug(lcQpaWindow) << "QCocoaWindow::setParent" << window() << (parentWindow ? parentWindow->window() : 0);
- // recreate the window for compatibility
- bool unhideAfterRecreate = parentWindow && !isEmbedded() && ![m_view isHidden];
+ // Recreate in case we need to get rid of a NSWindow, or create one
recreateWindowIfNeeded();
- if (unhideAfterRecreate)
- [m_view setHidden:NO];
+
setCocoaGeometry(geometry());
}