diff options
author | Tor Arne Vestbø <tor.arne.vestbo@qt.io> | 2017-06-23 13:26:26 +0200 |
---|---|---|
committer | Tor Arne Vestbø <tor.arne.vestbo@qt.io> | 2017-06-27 21:56:57 +0000 |
commit | 01d5aaa0f6bded240e9b0c8fb32a91d2afe8ae4d (patch) | |
tree | 0bcebf4b43aa939339ecd8397aeeb49d9158589c | |
parent | b619a9eada57451b30f8fde4b35c3143b0fdb715 (diff) |
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>
-rw-r--r-- | src/plugins/platforms/cocoa/qcocoawindow.mm | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/plugins/platforms/cocoa/qcocoawindow.mm b/src/plugins/platforms/cocoa/qcocoawindow.mm index 6c92751e9b..c9e2cdaf93 100644 --- a/src/plugins/platforms/cocoa/qcocoawindow.mm +++ b/src/plugins/platforms/cocoa/qcocoawindow.mm @@ -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; } |