]> git.sesse.net Git - vlc/commitdiff
Forced "on top" to the video widget in Qt4 while in fullscreen.
authorLaurent Aimar <fenrir@videolan.org>
Wed, 12 Aug 2009 20:12:42 +0000 (22:12 +0200)
committerLaurent Aimar <fenrir@videolan.org>
Wed, 12 Aug 2009 21:01:52 +0000 (23:01 +0200)
There is still a problem when the Gui itself has "on top" set.

modules/gui/qt4/components/interface_widgets.cpp

index 3c676aa234baf64dc01e6f831fe39d85da456a74..cf923d4d60219b18303b30a60e6ffc0428fe384d 100644 (file)
@@ -158,11 +158,18 @@ void VideoWidget::SetFullScreen( bool b_fs )
 {
     const Qt::WindowStates curstate = reparentable->windowState();
     Qt::WindowStates newstate = curstate;
+    Qt::WindowFlags  newflags = reparentable->windowFlags();
 
     if( b_fs )
+    {
         newstate |= Qt::WindowFullScreen;
+        newflags |= Qt::WindowStaysOnTopHint;
+    }
     else
+    {
         newstate &= ~Qt::WindowFullScreen;
+        newflags &= ~Qt::WindowStaysOnTopHint;
+    }
     if( newstate == curstate )
         return; /* no changes needed */
 
@@ -170,10 +177,12 @@ void VideoWidget::SetFullScreen( bool b_fs )
     {   /* Go full-screen */
         reparentable->setWindowState( newstate );
         reparentable->setParent( NULL );
+        reparentable->setWindowFlags( newflags );
         reparentable->show();
     }
     else
     {   /* Go windowed */
+        reparentable->setWindowFlags( newflags );
         layout->addWidget( reparentable );
         reparentable->setWindowState( newstate );
     }