[vlc-commits] qt: set FSControler screen when entering in fullscreen mode
Pierre Lamot
git at videolan.org
Sun Dec 17 23:22:12 CET 2017
vlc | branch: master | Pierre Lamot <pierre at videolabs.io> | Thu Dec 14 13:39:54 2017 +0100| [562a10a1570887291fde39a973c6a25cd96a453f] | 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>
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=562a10a1570887291fde39a973c6a25cd96a453f
---
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