summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorGabriel de Dietrich <gabriel.dedietrich@digia.com>2013-04-18 16:50:19 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-04-19 20:10:46 +0200
commit926086b9e37d45d09d5ce7d632a07583b40a8f70 (patch)
tree882be370d2415a26bceda07dd9481b812cdac4d2 /src
parent561e39a8457e68f000c4d99faed6c93583adf92b (diff)
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>
Diffstat (limited to 'src')
-rw-r--r--src/plugins/platforms/cocoa/qcocoawindow.mm11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/plugins/platforms/cocoa/qcocoawindow.mm b/src/plugins/platforms/cocoa/qcocoawindow.mm
index c5babae19e..5ff1bf83ae 100644
--- a/src/plugins/platforms/cocoa/qcocoawindow.mm
+++ b/src/plugins/platforms/cocoa/qcocoawindow.mm
@@ -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)];
}