[vlc-commits] commit: Qt4: do not set fullscreen window on top (fixes #3712) ( Rémi Denis-Courmont )

git at videolan.org git at videolan.org
Fri Jun 4 17:30:29 CEST 2010


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Fri Jun  4 18:15:45 2010 +0300| [312d9c3fc4dee049bf25288d7a3f519003c817b4] | committer: Rémi Denis-Courmont 

Qt4: do not set fullscreen window on top (fixes #3712)

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.

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=312d9c3fc4dee049bf25288d7a3f519003c817b4
---

 modules/gui/qt4/components/interface_widgets.cpp |    5 +++--
 modules/gui/qt4/components/interface_widgets.hpp |    2 +-
 modules/gui/qt4/main_interface.cpp               |    2 +-
 3 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/modules/gui/qt4/components/interface_widgets.cpp b/modules/gui/qt4/components/interface_widgets.cpp
index f33bac1..655600b 100644
--- a/modules/gui/qt4/components/interface_widgets.cpp
+++ b/modules/gui/qt4/components/interface_widgets.cpp
@@ -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
     {
diff --git a/modules/gui/qt4/components/interface_widgets.hpp b/modules/gui/qt4/components/interface_widgets.hpp
index c3fcd3a..7b9e2b9 100644
--- a/modules/gui/qt4/components/interface_widgets.hpp
+++ b/modules/gui/qt4/components/interface_widgets.hpp
@@ -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 ****************/
diff --git a/modules/gui/qt4/main_interface.cpp b/modules/gui/qt4/main_interface.cpp
index bbb6014..562dfc8 100644
--- a/modules/gui/qt4/main_interface.cpp
+++ b/modules/gui/qt4/main_interface.cpp
@@ -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.



More information about the vlc-commits mailing list