From 7284384eda22457adc1503c4f4d78f4f2772c45e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tor=20Arne=20Vestb=C3=B8?= Date: Tue, 21 Jul 2020 14:42:05 +0200 Subject: [PATCH] macOS: Remove workaround for zero-size GL views This is no longer a problem, and this condition should be handled by QCocoaGLContext in any case. Change-Id: Iaac9d1a8962b27bf6f0394b8c1ea3e46dc28e29e Reviewed-by: Timur Pocheptsov --- src/plugins/platforms/cocoa/qcocoawindow.mm | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/src/plugins/platforms/cocoa/qcocoawindow.mm b/src/plugins/platforms/cocoa/qcocoawindow.mm index e93592879d8..9a6555ca8c7 100644 --- a/src/plugins/platforms/cocoa/qcocoawindow.mm +++ b/src/plugins/platforms/cocoa/qcocoawindow.mm @@ -1511,15 +1511,8 @@ void QCocoaWindow::recreateWindowIfNeeded() setWindowFilePath(window()->filePath()); // Also sets window icon setWindowState(window()->windowState()); } else { - // Child windows have no NSWindow, link the NSViews instead. + // Child windows have no NSWindow, re-parent to superview instead [parentCocoaWindow->m_view addSubview:m_view]; - QRect rect = windowGeometry(); - // Prevent setting a (0,0) window size; causes opengl context - // "Invalid Drawable" warnings. - if (rect.isNull()) - rect.setSize(QSize(1, 1)); - NSRect frame = NSMakeRect(rect.x(), rect.y(), rect.width(), rect.height()); - [m_view setFrame:frame]; [m_view setHidden:!window()->isVisible()]; }