[vlc-devel] [PATCH] qt: prevent setMinimalView() from sizing incorrectly on fullscreen exit
Darrell Walisser
darrell.walisser at gmail.com
Mon Feb 29 00:05:24 CET 2016
---
modules/gui/qt/main_interface.cpp | 14 ++++++++++++++
1 file changed, 14 insertions(+)
diff --git a/modules/gui/qt/main_interface.cpp b/modules/gui/qt/main_interface.cpp
index 5d4acb5..d5d8b18 100644
--- a/modules/gui/qt/main_interface.cpp
+++ b/modules/gui/qt/main_interface.cpp
@@ -832,9 +832,23 @@ void MainInterface::setVideoFullScreen( bool fs )
}
else
{
+ QSize fullScreenSize;
+ if (isFullScreen())
+ fullScreenSize = size();
+
/* TODO do we want to restore screen and position ? (when
* qt-fullscreen-screennumber is forced) */
setInterfaceFullScreen( b_interfaceFullScreen );
+
+ /* The original widget width() and height() won't be realized
+ * immediately (maybe a bug in Qt). Using a timer won't
+ * work because it is unknown how long this could take.*/
+ while (fullScreenSize == size())
+ {
+ msg_Dbg(p_intf, "wait for fullscreen switch");
+ qApp->processEvents(QEventLoop::AllEvents, 100);
+ }
+
setMinimalView( b_minimalView );
#ifdef _WIN32
changeThumbbarButtons( THEMIM->getIM()->playingStatus() );
--
2.5.0
More information about the vlc-devel
mailing list