[vlc-commits] qt: always save non-fullscreen widget size
Romain Vimont
git at videolan.org
Mon Apr 16 03:37:30 CEST 2018
vlc | branch: master | Romain Vimont <rom1v at videolabs.io> | Fri Apr 13 18:35:57 2018 +0200| [d5941b70e7f6f371baae92f49e2d38ed1b7a3315] | 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 <jb at videolan.org>
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=d5941b70e7f6f371baae92f49e2d38ed1b7a3315
---
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 );
More information about the vlc-commits
mailing list