[vlc-commits] qt: Don't enforce a default screen to the fullscreen controller
Hugo Beauzée-Luyssen
git at videolan.org
Wed Mar 21 09:56:56 CET 2018
vlc | branch: master | Hugo Beauzée-Luyssen <hugo at beauzee.fr> | Tue Mar 20 16:10:19 2018 +0100| [22c9f2a46dbe3e427bf96560786c2473554450b4] | committer: Hugo Beauzée-Luyssen
qt: Don't enforce a default screen to the fullscreen controller
It already computes its position based on the video widget's
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=22c9f2a46dbe3e427bf96560786c2473554450b4
---
modules/gui/qt/main_interface.cpp | 13 +++----------
1 file changed, 3 insertions(+), 10 deletions(-)
diff --git a/modules/gui/qt/main_interface.cpp b/modules/gui/qt/main_interface.cpp
index f5496a2782..d0522e08e9 100644
--- a/modules/gui/qt/main_interface.cpp
+++ b/modules/gui/qt/main_interface.cpp
@@ -865,18 +865,11 @@ void MainInterface::setVideoFullScreen( bool fs )
if( fs )
{
int numscreen = var_InheritInteger( p_intf, "qt-fullscreen-screennumber" );
- /* if user hasn't defined screennumber, or screennumber that is bigger
- * than current number of screens, take screennumber where current interface
- * is
- */
- if( numscreen < 0 || numscreen >= QApplication::desktop()->screenCount() )
- numscreen = QApplication::desktop()->screenNumber( p_intf->p_sys->p_mi );
-
- if( fullscreenControls )
- fullscreenControls->setTargetScreen( numscreen );
- if ( numscreen >= 0 )
+ if ( numscreen >= 0 && numscreen < QApplication::desktop()->screenCount() )
{
+ if( fullscreenControls )
+ fullscreenControls->setTargetScreen( numscreen );
QRect screenres = QApplication::desktop()->screenGeometry( numscreen );
lastWinScreen = windowHandle()->screen();
More information about the vlc-commits
mailing list