]> git.sesse.net Git - vlc/commitdiff
Qt: raise the tooltip so it stays in front of the fullscreen controller
authorLudovic Fauvet <etix@videolan.org>
Wed, 17 Jul 2013 11:45:59 +0000 (13:45 +0200)
committerLudovic Fauvet <etix@videolan.org>
Wed, 17 Jul 2013 11:51:23 +0000 (13:51 +0200)
modules/gui/qt4/util/timetooltip.cpp
modules/gui/qt4/util/timetooltip.hpp

index d085719058a906f775faece0f69c4c3411184a9f..48a6879f7a70433b1b3894365d6d2f1b849e3144 100644 (file)
@@ -31,7 +31,7 @@
 #define TIP_HEIGHT 5
 
 TimeTooltip::TimeTooltip( QWidget *parent ) :
-    QWidget( parent ), mInitialized( false )
+    QWidget( parent )
 {
     setWindowFlags( Qt::Window                  |
                     Qt::WindowStaysOnTopHint    |
@@ -132,7 +132,6 @@ void TimeTooltip::buildPath()
 
 void TimeTooltip::setTip( const QPoint& target, const QString& time, const QString& text )
 {
-    mInitialized = true;
     mDisplayedText = time;
     if ( !text.isEmpty() )
         mDisplayedText.append( " - " ).append( text );
@@ -146,18 +145,13 @@ void TimeTooltip::setTip( const QPoint& target, const QString& time, const QStri
     }
 
     update();
+    raise();
 }
 
 void TimeTooltip::show()
 {
     setVisible( true );
-#ifdef Q_OS_OS2
-    // Bring a tooltip on the top
-    // Without this, tooltip does not appear on fullscreen
-    // from the second fullscreen state change
-    if( mInitialized )
-        QWidget::raise();
-#endif
+    raise();
 }
 
 void TimeTooltip::paintEvent( QPaintEvent * )
index af1036849d6fb7023915ae4e29b2ee9824fe2d88..ea6535d32b20931da30403a6942a4eb73129902a 100644 (file)
@@ -54,7 +54,6 @@ private:
     QPainterPath mPainterPath;
     QBitmap mMask;
     int mTipX;
-    bool mInitialized;
 };
 
 #endif // TIMETOOLTIP_H