[vlc-devel] [PATCH] qt: don't hide playing video when docking playlist

Pierre Lamot pierre at videolabs.io
Fri Nov 3 14:32:43 CET 2017


---
 modules/gui/qt/main_interface.cpp | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/modules/gui/qt/main_interface.cpp b/modules/gui/qt/main_interface.cpp
index e42192ff7b..fc49683777 100644
--- a/modules/gui/qt/main_interface.cpp
+++ b/modules/gui/qt/main_interface.cpp
@@ -632,6 +632,9 @@ inline void MainInterface::showTab( QWidget *widget )
                  stackCentralW->indexOf( stackCentralOldWidget ) );
     msg_Dbg( p_intf, "ShowTab request for %s", widget->metaObject()->className() );
 #endif
+    if ( stackCentralW->currentWidget() == widget )
+        return;
+
     /* fixing when the playlist has been undocked after being hidden.
        restoreStackOldWidget() is called when video stops but
        stackCentralOldWidget would still be pointing to playlist */
@@ -1034,7 +1037,7 @@ void MainInterface::dockPlaylist( bool p_docked )
         playlistVisible = playlistWidget->isVisible();
         stackCentralW->removeWidget( playlistWidget );
         dialog->importPlaylistWidget( playlistWidget );
-        if (THEMIM->getIM()->hasVideo())
+        if ( videoWidget && THEMIM->getIM()->hasVideo() )
             showTab(videoWidget);
         else
             showTab(bgWidget);
@@ -1042,7 +1045,7 @@ void MainInterface::dockPlaylist( bool p_docked )
     }
     else /* Previously undocked */
     {
-        playlistVisible = dialog->isVisible();
+        playlistVisible = dialog->isVisible() && !( videoWidget && THEMIM->getIM()->hasVideo() );
         dialog->hide();
         playlistWidget = dialog->exportPlaylistWidget();
         stackCentralW->addWidget( playlistWidget );
-- 
2.14.2



More information about the vlc-devel mailing list