macOS: Allow maximizing utility windows

They have a native maximize/zoom button in their titlebar, so there's no
reason for us to prevent the same action via the API. The only states
that are prevented are minimized and fullscreen.

Change-Id: I84fa48b31b243fa838c90ecdeee92a2f3448ee14
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
This commit is contained in:
Tor Arne Vestbø 2017-06-23 13:26:26 +02:00
parent b619a9eada
commit 01d5aaa0f6

View File

@ -1302,9 +1302,9 @@ void QCocoaWindow::applyWindowState(Qt::WindowStates requestedState)
const NSWindow *nsWindow = m_view.window;
if (nsWindow.styleMask & NSUtilityWindowMask) {
// Utility panels cannot be fullscreen
qWarning() << window()->type() << "windows can not be made full screen";
if (nsWindow.styleMask & NSUtilityWindowMask
&& newState & (Qt::WindowMinimized | Qt::WindowFullScreen)) {
qWarning() << window()->type() << "windows can not be made" << newState;
reportCurrentWindowState(true);
return;
}