[vlc-devel] [PATCH 1/1] qt: prevent setMinimalView() from sizing incorrectly on fullscreen exit

Darrell Walisser darrell.walisser at gmail.com
Sat Mar 19 00:08:26 CET 2016


---
 modules/gui/qt/main_interface.cpp | 14 ++++++--------
 modules/gui/qt/main_interface.hpp |  2 +-
 2 files changed, 7 insertions(+), 9 deletions(-)

diff --git a/modules/gui/qt/main_interface.cpp b/modules/gui/qt/main_interface.cpp
index 04acfdd..5300a22 100644
--- a/modules/gui/qt/main_interface.cpp
+++ b/modules/gui/qt/main_interface.cpp
@@ -815,16 +815,14 @@ void MainInterface::setVideoFullScreen( bool fs )
             showTab( videoWidget );
         }
 
-        /* */
-        setMinimalView( true );
         setInterfaceFullScreen( true );
+        setMinimalView( true, false );
     }
     else
     {
-        /* TODO do we want to restore screen and position ? (when
-         * qt-fullscreen-screennumber is forced) */
+        setMinimalView( b_minimalView, false );
         setInterfaceFullScreen( b_interfaceFullScreen );
-        setMinimalView( b_minimalView );
+
 #ifdef _WIN32
         changeThumbbarButtons( THEMIM->getIM()->playingStatus() );
 #endif
@@ -979,14 +977,14 @@ void MainInterface::dockPlaylist( bool p_docked )
  * setMinimalView is the private function used by
  * the SLOT toggleMinimalView and setVideoFullScreen
  */
-void MainInterface::setMinimalView( bool b_minimal )
+void MainInterface::setMinimalView( bool b_minimal, bool b_allowResize )
 {
     bool b_menuBarVisible = menuBar()->isVisible();
     bool b_controlsVisible = controls->isVisible();
     bool b_statusBarVisible = statusBar()->isVisible();
     bool b_inputCVisible = inputC->isVisible();
 
-    if( !isFullScreen() && !isMaximized() && b_minimal )
+    if( b_allowResize && !isFullScreen() && !isMaximized() && b_minimal )
     {
         int i_heightChange = 0;
 
@@ -1008,7 +1006,7 @@ void MainInterface::setMinimalView( bool b_minimal )
     statusBar()->setVisible( !b_minimal && b_statusbarVisible );
     inputC->setVisible( !b_minimal );
 
-    if( !isFullScreen() && !isMaximized() && !b_minimal )
+    if( b_allowResize && !isFullScreen() && !isMaximized() && !b_minimal )
     {
         int i_heightChange = 0;
 
diff --git a/modules/gui/qt/main_interface.hpp b/modules/gui/qt/main_interface.hpp
index 87bd5bb..de1fb80 100644
--- a/modules/gui/qt/main_interface.hpp
+++ b/modules/gui/qt/main_interface.hpp
@@ -123,7 +123,7 @@ private:
     void restoreStackOldWidget();
 
     /* */
-    void setMinimalView( bool );
+    void setMinimalView( bool b_enable, bool b_allowResize=true );
     void setInterfaceFullScreen( bool );
     void computeMinimumSize();
 
-- 
2.5.0



More information about the vlc-devel mailing list