[vlc-commits] qt: set FSControler screen when entering in fullscreen mode

Pierre Lamot git at videolan.org
Sun Dec 17 23:36:37 CET 2017


vlc/vlc-3.0 | branch: master | Pierre Lamot <pierre at videolabs.io> | Thu Dec 14 13:39:54 2017 +0100| [a0325a6bc449c1d8ca7ce656cab3ffb6bfe52e0d] | committer: Jean-Baptiste Kempf

qt: set FSControler screen when entering in fullscreen mode

qt-fullscreen-screennumber was read at startup for FSControler
  but dynamically for the main interface

Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>
(cherry picked from commit 562a10a1570887291fde39a973c6a25cd96a453f)
Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>

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

 modules/gui/qt/components/controller.cpp | 9 ++++++++-
 modules/gui/qt/components/controller.hpp | 1 +
 modules/gui/qt/main_interface.cpp        | 1 +
 3 files changed, 10 insertions(+), 1 deletion(-)

diff --git a/modules/gui/qt/components/controller.cpp b/modules/gui/qt/components/controller.cpp
index 2a732d1f12..c8ed2825e9 100644
--- a/modules/gui/qt/components/controller.cpp
+++ b/modules/gui/qt/components/controller.cpp
@@ -846,7 +846,7 @@ FullscreenControllerWidget::FullscreenControllerWidget( intf_thread_t *_p_i, QWi
     previousPosition = getSettings()->value( "FullScreen/pos" ).toPoint();
     screenRes = getSettings()->value( "FullScreen/screen" ).toRect();
     isWideFSC = getSettings()->value( "FullScreen/wide" ).toBool();
-    i_screennumber = var_InheritInteger( p_intf, "qt-fullscreen-screennumber" );
+    i_screennumber = -1;
 
     CONNECT( this, fullscreenChanged( bool ), THEMIM, changeFullscreen( bool ) );
 }
@@ -984,6 +984,13 @@ void FullscreenControllerWidget::toggleFullwidth()
     restoreFSC();
 }
 
+
+void FullscreenControllerWidget::setTargetScreen(int screennumber)
+{
+    i_screennumber = screennumber;
+}
+
+
 int FullscreenControllerWidget::targetScreen()
 {
     if( i_screennumber < 0 || i_screennumber >= QApplication::desktop()->screenCount() )
diff --git a/modules/gui/qt/components/controller.hpp b/modules/gui/qt/components/controller.hpp
index b34147d5ab..8bfe8e259c 100644
--- a/modules/gui/qt/components/controller.hpp
+++ b/modules/gui/qt/components/controller.hpp
@@ -257,6 +257,7 @@ public:
     void toggleFullwidth();
     void updateFullwidthGeometry( int number );
     int targetScreen();
+    void setTargetScreen( int );
 
 private:
     static int FullscreenChanged( vlc_object_t *obj,
diff --git a/modules/gui/qt/main_interface.cpp b/modules/gui/qt/main_interface.cpp
index 3b576ac23d..525d71722d 100644
--- a/modules/gui/qt/main_interface.cpp
+++ b/modules/gui/qt/main_interface.cpp
@@ -865,6 +865,7 @@ void MainInterface::setVideoFullScreen( bool fs )
         if( numscreen < 0 || numscreen >= QApplication::desktop()->screenCount() )
             numscreen = QApplication::desktop()->screenNumber( p_intf->p_sys->p_mi );
 
+        fullscreenControls->setTargetScreen( numscreen );
         QRect screenres = QApplication::desktop()->screenGeometry( numscreen );
         lastWinScreen = windowHandle()->screen();
         windowHandle()->setScreen(QGuiApplication::screens()[numscreen]);



More information about the vlc-commits mailing list