[vlc-commits] Qt: raise the tooltip so it stays in front of the fullscreen controller
Ludovic Fauvet
git at videolan.org
Wed Jul 17 14:52:10 CEST 2013
vlc | branch: master | Ludovic Fauvet <etix at videolan.org> | Wed Jul 17 13:45:59 2013 +0200| [697766fe84fc6fa94f1bef61dbf0193991474a58] | committer: Ludovic Fauvet
Qt: raise the tooltip so it stays in front of the fullscreen controller
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=697766fe84fc6fa94f1bef61dbf0193991474a58
---
modules/gui/qt4/util/timetooltip.cpp | 12 +++---------
modules/gui/qt4/util/timetooltip.hpp | 1 -
2 files changed, 3 insertions(+), 10 deletions(-)
diff --git a/modules/gui/qt4/util/timetooltip.cpp b/modules/gui/qt4/util/timetooltip.cpp
index d085719..48a6879 100644
--- a/modules/gui/qt4/util/timetooltip.cpp
+++ b/modules/gui/qt4/util/timetooltip.cpp
@@ -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 * )
diff --git a/modules/gui/qt4/util/timetooltip.hpp b/modules/gui/qt4/util/timetooltip.hpp
index af10368..ea6535d 100644
--- a/modules/gui/qt4/util/timetooltip.hpp
+++ b/modules/gui/qt4/util/timetooltip.hpp
@@ -54,7 +54,6 @@ private:
QPainterPath mPainterPath;
QBitmap mMask;
int mTipX;
- bool mInitialized;
};
#endif // TIMETOOLTIP_H
More information about the vlc-commits
mailing list