diff options
author | Timur Pocheptsov <timur.pocheptsov@theqtcompany.com> | 2015-10-16 15:35:27 +0200 |
---|---|---|
committer | Timur Pocheptsov <timur.pocheptsov@theqtcompany.com> | 2015-10-16 14:00:47 +0000 |
commit | 5632375b86f467177b7cd326d2e194692753f4a6 (patch) | |
tree | 2ebc37ebe64216c193a24508df27d6adc40350ce /src/plugins/platforms/cocoa | |
parent | 1901adbab796e27e7ed862e850a2171ffc4dde90 (diff) |
Cocoa integration - fix Qt::WindowFullscreenButtonHint
Window collection behavior changed from OS X <= 10.9 to 10.10 to 10.11:
- the default behavior (0) included fullscreen button before 10.10, did not include
in 10.10, and now it's again included.
- it's not enough to exclude fullscreen - since the defualt is 0,
0 & ~fullscreen does not help - we also have to set fullscreen
auxiliary.
Task-number: QTBUG-48759
Change-Id: If427bd5cfa5c3cefc71f09dae7baa0d232601ee4
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@theqtcompany.com>
Diffstat (limited to 'src/plugins/platforms/cocoa')
-rw-r--r-- | src/plugins/platforms/cocoa/qcocoawindow.mm | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/plugins/platforms/cocoa/qcocoawindow.mm b/src/plugins/platforms/cocoa/qcocoawindow.mm index 6f1e355790..a545dbddd5 100644 --- a/src/plugins/platforms/cocoa/qcocoawindow.mm +++ b/src/plugins/platforms/cocoa/qcocoawindow.mm @@ -885,10 +885,13 @@ void QCocoaWindow::setWindowFlags(Qt::WindowFlags flags) Qt::WindowType type = window()->type(); if ((type & Qt::Popup) != Qt::Popup && (type & Qt::Dialog) != Qt::Dialog) { NSWindowCollectionBehavior behavior = [m_nsWindow collectionBehavior]; - if (flags & Qt::WindowFullscreenButtonHint) + if (flags & Qt::WindowFullscreenButtonHint) { behavior |= NSWindowCollectionBehaviorFullScreenPrimary; - else + behavior &= ~NSWindowCollectionBehaviorFullScreenAuxiliary; + } else { + behavior |= NSWindowCollectionBehaviorFullScreenAuxiliary; behavior &= ~NSWindowCollectionBehaviorFullScreenPrimary; + } [m_nsWindow setCollectionBehavior:behavior]; } setWindowZoomButton(flags); |