diff options
-rw-r--r-- | src/plugins/platforms/cocoa/qcocoawindow.mm | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/plugins/platforms/cocoa/qcocoawindow.mm b/src/plugins/platforms/cocoa/qcocoawindow.mm index d972782f31..07b4100d4a 100644 --- a/src/plugins/platforms/cocoa/qcocoawindow.mm +++ b/src/plugins/platforms/cocoa/qcocoawindow.mm @@ -1153,6 +1153,10 @@ void QCocoaWindow::recreateWindow(const QPlatformWindow *parentWindow) // Child windows have no NSWindow, link the NSViews instead. [m_parentCocoaWindow->m_contentView addSubview : m_contentView]; QRect rect = window()->geometry(); + // 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_contentView setFrame:frame]; [m_contentView setHidden: YES]; |