Cocoa: Disable QTBUG-30266 hack in full screen

That would set the full screen window in a weird state, where is was
full screen (but unable to exit that mode) and showing the title bar
at the same time.

Change-Id: I3ac913876f3b326504dd5af18c34181d002509d0
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
This commit is contained in:
Gabriel de Dietrich 2013-04-18 16:50:19 +02:00 committed by The Qt Project
parent 561e39a845
commit 926086b9e3

View File

@ -283,6 +283,10 @@ void QCocoaWindow::setVisible(bool visible)
parentCocoaWindow->m_activePopupWindow = window();
// QTBUG-30266: a window should not be resizable while a transient popup is open
// Since this isn't a native popup, the window manager doesn't close the popup when you click outside
#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_7
if (QSysInfo::QSysInfo::MacintoshVersion >= QSysInfo::MV_10_7
&& !([parentCocoaWindow->m_nsWindow styleMask] & NSFullScreenWindowMask))
#endif
[parentCocoaWindow->m_nsWindow setStyleMask:
(parentCocoaWindow->windowStyleMask(parentCocoaWindow->m_windowFlags) & ~NSResizableWindowMask)];
}
@ -346,7 +350,12 @@ void QCocoaWindow::setVisible(bool visible)
} else {
[m_contentView setHidden:YES];
}
if (parentCocoaWindow && window()->type() == Qt::Popup)
if (parentCocoaWindow && window()->type() == Qt::Popup
#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_7
&& QSysInfo::QSysInfo::MacintoshVersion >= QSysInfo::MV_10_7
&& !([parentCocoaWindow->m_nsWindow styleMask] & NSFullScreenWindowMask)
#endif
)
// QTBUG-30266: a window should not be resizable while a transient popup is open
[parentCocoaWindow->m_nsWindow setStyleMask:parentCocoaWindow->windowStyleMask(parentCocoaWindow->m_windowFlags)];
}