]> git.sesse.net Git - vlc/commitdiff
Qt4: do not set fullscreen window on top (fixes #3712)
authorRémi Denis-Courmont <remi@remlab.net>
Fri, 4 Jun 2010 15:15:45 +0000 (18:15 +0300)
committerRémi Denis-Courmont <remi@remlab.net>
Fri, 4 Jun 2010 15:30:00 +0000 (18:30 +0300)
Normally, the window will go on top of the stack of normal windows
anyway. If not, we may need to force this, which is different from
always-on-top in any case.

Known issue: toggling video on top while in fullscreen is not
implemented yet.

modules/gui/qt4/components/interface_widgets.cpp
modules/gui/qt4/components/interface_widgets.hpp
modules/gui/qt4/main_interface.cpp

index f33bac1c21616dd8b5220874b1c3fab17b812f35..655600be136d0ccdd5cc5a5f3e5b75a1f53547fc 100644 (file)
@@ -187,7 +187,7 @@ void VideoWidget::SetSizing( unsigned int w, unsigned int h )
     videoSync();
 }
 
-void VideoWidget::SetFullScreen( bool b_fs )
+void VideoWidget::SetFullScreen( bool b_fs, bool b_ontop )
 {
     const Qt::WindowStates curstate = reparentable->windowState();
     Qt::WindowStates newstate = curstate;
@@ -197,7 +197,8 @@ void VideoWidget::SetFullScreen( bool b_fs )
     if( b_fs )
     {
         newstate |= Qt::WindowFullScreen;
-        newflags |= Qt::WindowStaysOnTopHint;
+        if( b_ontop )
+            newflags |= Qt::WindowStaysOnTopHint;
     }
     else
     {
index c3fcd3a39ebb2d3edc0918ca7f2ffe6a0d179055..7b9e2b92b69a5654022458edd587e4aeed8a98e5 100644 (file)
@@ -61,6 +61,7 @@ public:
     WId request( int *, int *, unsigned int *, unsigned int *, bool );
     void  release( void );
     int   control( void *, int, va_list );
+    void SetFullScreen( bool, bool );
 
 protected:
     virtual QPaintEngine *paintEngine() const
@@ -80,7 +81,6 @@ signals:
 
 public slots:
     void SetSizing( unsigned int, unsigned int );
-    void SetFullScreen( bool );
 };
 
 /******************** Background Widget ****************/
index bbb6014ac3d50c37f3f190f1113d7dbda2e40708..562dfc83a8a30f92fb62fe67e17c681e7144d32e 100644 (file)
@@ -603,7 +603,7 @@ void MainInterface::setVideoFullScreen( bool fs )
     b_videoFullScreen = fs;
     /* refresh main interface on-top status if needed */
     setVideoOnTop( b_videoOnTop );
-    videoWidget->SetFullScreen( fs );
+    videoWidget->SetFullScreen( fs, b_videoOnTop );
 }
 
 /* Slot to change the video always-on-top flag.