Task-number: QTBUG-26617
Change-Id: I6dfc3f208368ddf6be65259218aee88db9692cfe
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
if (!m_nsWindow)
return;
+ // if content view width or height is 0 then the window animations will crash so
+ // do nothing except set the new state
+ NSRect contentRect = [contentView() frame];
+ if (contentRect.size.width <= 0 || contentRect.size.height <= 0) {
+ qWarning() << Q_FUNC_INFO << "invalid window content view size, check your window geometry";
+ m_synchedWindowState = newState;
+ return;
+ }
+
if ((m_synchedWindowState & Qt::WindowMaximized) != (newState & Qt::WindowMaximized)) {
[m_nsWindow performZoom : m_nsWindow]; // toggles
}