summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorNorwegian Rock Cat <qt-info@nokia.com>2009-03-30 15:08:13 (GMT)
committerNorwegian Rock Cat <qt-info@nokia.com>2009-03-30 15:12:54 (GMT)
commit25fcffe289e5117c71335bb7fe259751056d4dda (patch)
tree04c29275076bff8d20b61cf2047d339423b72deb /src
parentae1606b18c099b743e3cb410395b35ee290ae335 (diff)
downloadQt-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')
-rw-r--r--src/gui/kernel/qapplication_mac.mm9
-rw-r--r--src/gui/kernel/qwidget_mac.mm16
2 files changed, 5 insertions, 20 deletions
diff --git a/src/gui/kernel/qapplication_mac.mm b/src/gui/kernel/qapplication_mac.mm
index 5f8c572..ae99e83 100644
--- a/src/gui/kernel/qapplication_mac.mm
+++ b/src/gui/kernel/qapplication_mac.mm
@@ -1638,15 +1638,6 @@ QApplicationPrivate::globalEventProcessor(EventHandlerCallRef er, EventRef event
bool inNonClientArea = false;
GetEventParameter(event, kEventParamMouseLocation, typeQDPoint, 0,
sizeof(where), 0, &where);
- if(ekind == kEventMouseMoved && qt_mac_app_fullscreen &&
- QApplication::desktop()->screenNumber(QPoint(where.h, where.v)) ==
- QApplication::desktop()->primaryScreen()) {
- if(where.v <= 0)
- ShowMenuBar();
- else if(qt_mac_window_at(where.h, where.v, 0) != inMenuBar)
- HideMenuBar();
- }
-
#if defined(DEBUG_MOUSE_MAPS)
const char *edesc = 0;
switch(ekind) {
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)