summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorTor Arne Vestbø <tor.arne.vestbo@qt.io>2020-07-21 14:42:05 +0200
committerTor Arne Vestbø <tor.arne.vestbo@qt.io>2020-07-22 16:33:29 +0200
commit7284384eda22457adc1503c4f4d78f4f2772c45e (patch)
treec9d8318d2443a68b89cabd719488f7020b778771 /src
parent8b60ebf93a4ca443a0c101ea72cb806a2b105f04 (diff)
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 <timur.pocheptsov@qt.io>
Diffstat (limited to 'src')
-rw-r--r--src/plugins/platforms/cocoa/qcocoawindow.mm9
1 files changed, 1 insertions, 8 deletions
diff --git a/src/plugins/platforms/cocoa/qcocoawindow.mm b/src/plugins/platforms/cocoa/qcocoawindow.mm
index e93592879d..9a6555ca8c 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()];
}