[vlc-devel] [PATCH] qt: always save non-fullscreen widget size
Romain Vimont
rom1v at videolabs.io
Fri Apr 13 18:35:57 CEST 2018
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
---
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 );
--
2.17.0
More information about the vlc-devel
mailing list