src/gui/kernel/qtooltip.cpp
changeset 7 f7bc934e204c
parent 0 1918ee327afb
equal deleted inserted replaced
3:41300fa6a67c 7:f7bc934e204c
     1 /****************************************************************************
     1 /****************************************************************************
     2 **
     2 **
     3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
     3 ** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
     4 ** All rights reserved.
     4 ** All rights reserved.
     5 ** Contact: Nokia Corporation (qt-info@nokia.com)
     5 ** Contact: Nokia Corporation (qt-info@nokia.com)
     6 **
     6 **
     7 ** This file is part of the QtGui module of the Qt Toolkit.
     7 ** This file is part of the QtGui module of the Qt Toolkit.
     8 **
     8 **
   366     }
   366     }
   367 #endif //QT_NO_STYLE_STYLESHEET
   367 #endif //QT_NO_STYLE_STYLESHEET
   368 
   368 
   369 
   369 
   370 #ifdef Q_WS_MAC
   370 #ifdef Q_WS_MAC
   371     QRect screen = QApplication::desktop()->availableGeometry(getTipScreen(pos, w));
   371     // When in full screen mode, there is no Dock nor Menu so we can use
       
   372     // the whole screen for displaying the tooltip. However when not in
       
   373     // full screen mode we need to save space for the dock, so we use
       
   374     // availableGeometry instead.
       
   375     extern bool qt_mac_app_fullscreen; //qapplication_mac.mm
       
   376     QRect screen;
       
   377     if(qt_mac_app_fullscreen)
       
   378         screen = QApplication::desktop()->screenGeometry(getTipScreen(pos, w));
       
   379     else
       
   380         screen = QApplication::desktop()->availableGeometry(getTipScreen(pos, w));
   372 #else
   381 #else
   373     QRect screen = QApplication::desktop()->screenGeometry(getTipScreen(pos, w));
   382     QRect screen = QApplication::desktop()->screenGeometry(getTipScreen(pos, w));
   374 #endif
   383 #endif
   375 
   384 
   376     QPoint p = pos;
   385     QPoint p = pos;