vlc/vlc-3.0 | branch: master | Romain Vimont <ro...@videolabs.io> | Fri Apr 13 
18:35:57 2018 +0200| [b3fd77e25d1d37f4c10962dcbab5f5f2fb9a3928] | committer: 
Jean-Baptiste Kempf

qt: always save non-fullscreen widget size

restoreStackOldWidget() should always restore the size the widget have
when fullscreen is disabled.

Therefore, save the size before switching to fullscreen, and never
update while fullscreen is enabled.

Fixes #20224

Signed-off-by: Jean-Baptiste Kempf <j...@videolan.org>
(cherry picked from commit d5941b70e7f6f371baae92f49e2d38ed1b7a3315)
Signed-off-by: Jean-Baptiste Kempf <j...@videolan.org>

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

 modules/gui/qt/main_interface.cpp | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/modules/gui/qt/main_interface.cpp 
b/modules/gui/qt/main_interface.cpp
index 3545ab6094..e3b76ee228 100644
--- a/modules/gui/qt/main_interface.cpp
+++ b/modules/gui/qt/main_interface.cpp
@@ -646,7 +646,8 @@ inline void MainInterface::showTab( QWidget *widget, bool 
video_closing )
         widget = bgWidget;
 
     stackCentralOldWidget = stackCentralW->currentWidget();
-    stackWidgetsSizes[stackCentralOldWidget] = stackCentralW->size();
+    if( !isFullScreen() )
+        stackWidgetsSizes[stackCentralOldWidget] = stackCentralW->size();
 
     /* If we are playing video, embedded */
     if( !video_closing && videoWidget && THEMIM->getIM()->hasVideo() )
@@ -893,6 +894,9 @@ void MainInterface::setVideoFullScreen( bool fs )
             }
         }
 
+        /* we won't be able to get its windowed sized once in fullscreen, so 
update it now */
+        stackWidgetsSizes[stackCentralW->currentWidget()] = 
stackCentralW->size();
+
         /* */
         displayNormalView();
         setInterfaceFullScreen( true );

_______________________________________________
vlc-commits mailing list
vlc-commits@videolan.org
https://mailman.videolan.org/listinfo/vlc-commits

Reply via email to