[vlc-commits] Qt: exiting fullscreen now restores the window to the correct size

Benoit du Payrat git at videolan.org
Wed Apr 20 13:15:40 CEST 2016


vlc | branch: master | Benoit du Payrat <benoit at videolabs.io> | Wed Apr 20 11:53:43 2016 +0200| [422e5958e7a96ade3b89b7030c5eddf44ba12899] | committer: Jean-Baptiste Kempf

Qt: exiting fullscreen now restores the window to the correct size

Fix #16763

Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>

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

 modules/gui/qt/main_interface.cpp |   19 ++++++++++++++++---
 modules/gui/qt/main_interface.hpp |    1 +
 2 files changed, 17 insertions(+), 3 deletions(-)

diff --git a/modules/gui/qt/main_interface.cpp b/modules/gui/qt/main_interface.cpp
index 04acfdd..8f91e9a 100644
--- a/modules/gui/qt/main_interface.cpp
+++ b/modules/gui/qt/main_interface.cpp
@@ -816,15 +816,15 @@ void MainInterface::setVideoFullScreen( bool fs )
         }
 
         /* */
-        setMinimalView( true );
+        displayNormalView();
         setInterfaceFullScreen( true );
     }
     else
     {
         /* TODO do we want to restore screen and position ? (when
          * qt-fullscreen-screennumber is forced) */
-        setInterfaceFullScreen( b_interfaceFullScreen );
         setMinimalView( b_minimalView );
+        setInterfaceFullScreen( b_interfaceFullScreen );
 #ifdef _WIN32
         changeThumbbarButtons( THEMIM->getIM()->playingStatus() );
 #endif
@@ -976,8 +976,21 @@ void MainInterface::dockPlaylist( bool p_docked )
 }
 
 /*
+ * displayNormalView is the private function used by
+ * the SLOT setVideoFullScreen to restore the menuBar
+ * if minimal view is off
+ */
+void MainInterface::displayNormalView()
+{
+    menuBar()->setVisible( false );
+    controls->setVisible( false );
+    statusBar()->setVisible( false );
+    inputC->setVisible( false );
+}
+
+/*
  * setMinimalView is the private function used by
- * the SLOT toggleMinimalView and setVideoFullScreen
+ * the SLOT toggleMinimalView
  */
 void MainInterface::setMinimalView( bool b_minimal )
 {
diff --git a/modules/gui/qt/main_interface.hpp b/modules/gui/qt/main_interface.hpp
index 87bd5bb..dcf6cc9 100644
--- a/modules/gui/qt/main_interface.hpp
+++ b/modules/gui/qt/main_interface.hpp
@@ -123,6 +123,7 @@ private:
     void restoreStackOldWidget();
 
     /* */
+    void displayNormalView();
     void setMinimalView( bool );
     void setInterfaceFullScreen( bool );
     void computeMinimumSize();



More information about the vlc-commits mailing list