diff options
author | Qt Continuous Integration System <qt-info@nokia.com> | 2010-01-21 09:51:23 (GMT) |
---|---|---|
committer | Qt Continuous Integration System <qt-info@nokia.com> | 2010-01-21 09:51:23 (GMT) |
commit | bd4cbc57ee6b3d2721a51932f4eaea8d8b07f04f (patch) | |
tree | dcafaaefffc52259c6329df558fd674bca2a6ac5 | |
parent | 513d6bd7388e27f32b2868ded6174ca84212cd1b (diff) | |
parent | 0481c2dfbbcc59b76bde3f72fbe6d1e4003c913a (diff) | |
download | Qt-bd4cbc57ee6b3d2721a51932f4eaea8d8b07f04f.zip Qt-bd4cbc57ee6b3d2721a51932f4eaea8d8b07f04f.tar.gz Qt-bd4cbc57ee6b3d2721a51932f4eaea8d8b07f04f.tar.bz2 |
Merge branch '4.6' of scm.dev.nokia.troll.no:qt/oslo-staging-1 into 4.6-integration
* '4.6' of scm.dev.nokia.troll.no:qt/oslo-staging-1:
Menubar and dock disappear after hiding a fullscreen widget on Cocoa.
Changelog.
-rw-r--r-- | dist/changes-4.6.1 | 2 | ||||
-rw-r--r-- | src/gui/kernel/qwidget_mac.mm | 32 |
2 files changed, 34 insertions, 0 deletions
diff --git a/dist/changes-4.6.1 b/dist/changes-4.6.1 index 3df6887..4a567bb 100644 --- a/dist/changes-4.6.1 +++ b/dist/changes-4.6.1 @@ -247,6 +247,8 @@ QtSvg * [QTBUG-6867] Fixed regression in the parsing of paths with relative offsets. * [QTBUG-6899] Fixed crash when parsing invalid coordinate list. + - QtXmlPatterns + * [QTBUG-6771] Fixed static builds. Qt Plugins ---------- diff --git a/src/gui/kernel/qwidget_mac.mm b/src/gui/kernel/qwidget_mac.mm index b18830f..3dbc843 100644 --- a/src/gui/kernel/qwidget_mac.mm +++ b/src/gui/kernel/qwidget_mac.mm @@ -3414,6 +3414,38 @@ void QWidgetPrivate::hide_sys() ShowHide(window, false); #else [window orderOut:window]; + // Unfortunately it is not as easy as just hiding the window, we need + // to find out if we were in full screen mode. If we were and this is + // the last window in full screen mode then we need to unset the full screen + // mode. If this is not the last visible window in full screen mode then we + // don't change the full screen mode. + if(q->isFullScreen()) + { + bool keepFullScreen = false; + QWidgetList windowList = qApp->topLevelWidgets(); + int windowCount = windowList.count(); + for(int i = 0; i < windowCount; i++) + { + QWidget *w = windowList[i]; + // If it is the same window, we don't need to check :-) + if(q == w) + continue; + // If they are not visible or if they are minimized then + // we just ignore them. + if(!w->isVisible() || w->isMinimized()) + continue; + // Is it full screen? + // Notice that if there is one window in full screen mode then we + // cannot switch the full screen mode off, therefore we just abort. + if(w->isFullScreen()) { + keepFullScreen = true; + break; + } + } + // No windows in full screen mode, so let just unset that flag. + if(!keepFullScreen) + qt_mac_set_fullscreen_mode(false); + } #endif toggleDrawers(false); #ifndef QT_MAC_USE_COCOA |