[vlc-commits] qt: Don't enforce a default screen to the fullscreen controller

Hugo Beauzée-Luyssen git at videolan.org
Wed Mar 21 15:08:04 CET 2018


vlc/vlc-3.0 | branch: master | Hugo Beauzée-Luyssen <hugo at beauzee.fr> | Tue Mar 20 16:10:19 2018 +0100| [169a441790e9006652487d5424b0e3678612a6fd] | 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

(cherry picked from commit 22c9f2a46dbe3e427bf96560786c2473554450b4)
Signed-off-by: Hugo Beauzée-Luyssen <hugo at beauzee.fr>

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

 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