From a199a87ad5452938482291ba5e2995e220678f7d Mon Sep 17 00:00:00 2001 From: Gabriel de Dietrich Date: Mon, 4 Nov 2013 16:08:08 +0100 Subject: Cocoa: Don't hide views when reparenting MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Commit a2bdda8e3ba32 was meant for creation only. We should not hide views on our own, particularly when Qt had not asked for that. Task-number: QTBUG-33581 Change-Id: Ib35fc78a27be1498f80aabd385e7a2185475b949 Reviewed-by: Morten Johan Sørvig --- src/plugins/platforms/cocoa/qcocoawindow.mm | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src') diff --git a/src/plugins/platforms/cocoa/qcocoawindow.mm b/src/plugins/platforms/cocoa/qcocoawindow.mm index 565594a98a..228ef9d484 100644 --- a/src/plugins/platforms/cocoa/qcocoawindow.mm +++ b/src/plugins/platforms/cocoa/qcocoawindow.mm @@ -713,7 +713,10 @@ WId QCocoaWindow::winId() const void QCocoaWindow::setParent(const QPlatformWindow *parentWindow) { // recreate the window for compatibility + bool unhideAfterRecreate = parentWindow && !m_contentViewIsToBeEmbedded && ![m_contentView isHidden]; recreateWindow(parentWindow); + if (unhideAfterRecreate) + [m_contentView setHidden:NO]; setCocoaGeometry(geometry()); } -- cgit v1.2.3