diff options
author | Norwegian Rock Cat <qt-info@nokia.com> | 2009-03-30 15:08:13 (GMT) |
---|---|---|
committer | Norwegian Rock Cat <qt-info@nokia.com> | 2009-03-30 15:12:54 (GMT) |
commit | 25fcffe289e5117c71335bb7fe259751056d4dda (patch) | |
tree | 04c29275076bff8d20b61cf2047d339423b72deb /src/gui/kernel/qwidget_mac.mm | |
parent | ae1606b18c099b743e3cb410395b35ee290ae335 (diff) | |
download | Qt-25fcffe289e5117c71335bb7fe259751056d4dda.zip Qt-25fcffe289e5117c71335bb7fe259751056d4dda.tar.gz Qt-25fcffe289e5117c71335bb7fe259751056d4dda.tar.bz2 |
Consistency between Carbon and Cocoa with fullscreen mode.
On Carbon, we did show/hide menubar, on Cocoa we used SetSystemUIMode.
But SetSystemUIMode is available to both, so why not just do that and
make everything consistent. We now act more like other fullscreen apps
(i.e., we show the menu and dock when the mouse is close to them). The
good thing is that it should be easier to override this behavior as
well. I also removed some code in our mouse handler where we were
calling HideMenuBar as I don't see a great reason for it at the moment
in any case, it would be inconsistent between Carbon and Cocoa.
Task-number: 249655
Reviewed-by: Prasanth Ullattil
Diffstat (limited to 'src/gui/kernel/qwidget_mac.mm')
-rw-r--r-- | src/gui/kernel/qwidget_mac.mm | 16 |
1 files changed, 5 insertions, 11 deletions
diff --git a/src/gui/kernel/qwidget_mac.mm b/src/gui/kernel/qwidget_mac.mm index cd11b52..3b011d5 100644 --- a/src/gui/kernel/qwidget_mac.mm +++ b/src/gui/kernel/qwidget_mac.mm @@ -392,21 +392,15 @@ QWidget *qt_mac_find_window(OSWindowRef window) inline static void qt_mac_set_fullscreen_mode(bool b) { - extern bool qt_mac_app_fullscreen; //qapplication_mac.cpp + extern bool qt_mac_app_fullscreen; //qapplication_mac.mm if(qt_mac_app_fullscreen == b) return; qt_mac_app_fullscreen = b; -#if QT_MAC_USE_COCOA - if(b) - SetSystemUIMode(kUIModeAllHidden, kUIOptionAutoShowMenuBar); - else + if (b) { + SetSystemUIMode(kUIModeAllSuppressed, 0); + } else { SetSystemUIMode(kUIModeNormal, 0); -#else - if(b) - HideMenuBar(); - else - ShowMenuBar(); -#endif + } } Q_GUI_EXPORT OSViewRef qt_mac_nativeview_for(const QWidget *w) |