[vlc-commits] skins2: fix fullscreen wrong size on Windows10 (high DPI)

Erwan Tulou git at videolan.org
Sun Dec 16 21:46:30 CET 2018


vlc/vlc-3.0 | branch: master | Erwan Tulou <erwan10 at videolan.org> | Thu Oct  4 22:04:34 2018 +0200| [4cba4c02857701479fdc9eb7874aee50847b15e0] | committer: Jean-Baptiste Kempf

skins2: fix fullscreen wrong size on Windows10 (high DPI)

When setting the scaling factor of Windows10 to something different
from the default 100%, a wrong fullscreen width/height was used.

At init, the skins2 engine is a non DPI-aware process. Since Windows10
expects to rescale in the background, reported sizes are altered.
Then, the skins2 engine launches the qt dialog provider, which makes the
process go from non DPI to DPI aware. As a result, Windows10 stops plans
to rescale, and provides the application with the real sizes.

The patch uses the latest valid sizes whatsoever.

This fixes trac #15349

TODO: As of today, the skins2 engine is seen as DPI aware,
(because of Qt) but nothing is implemented to behave accordingly.

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

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

 modules/gui/skins2/src/vout_manager.cpp | 19 +++++++------------
 1 file changed, 7 insertions(+), 12 deletions(-)

diff --git a/modules/gui/skins2/src/vout_manager.cpp b/modules/gui/skins2/src/vout_manager.cpp
index 442c9b265e..e555e5e6f9 100644
--- a/modules/gui/skins2/src/vout_manager.cpp
+++ b/modules/gui/skins2/src/vout_manager.cpp
@@ -325,8 +325,6 @@ void VoutManager::onUpdate( Subject<VarBool> &rVariable, void *arg )
 void VoutManager::configureFullscreen( VoutWindow& rWindow )
 {
     int numScr = var_InheritInteger( getIntf(), "qt-fullscreen-screennumber" );
-    int x0 = m_pVoutMainWindow->getTop();
-    int y0 = m_pVoutMainWindow->getLeft();
 
     int x, y, w, h;
     if( numScr >= 0 )
@@ -341,16 +339,13 @@ void VoutManager::configureFullscreen( VoutWindow& rWindow )
         rWindow.getMonitorInfo( &x, &y, &w, &h );
     }
 
-    if( x != x0 || y != y0 )
-    {
-        // move and resize fullscreen
-        m_pVoutMainWindow->move( x, y );
-        m_pVoutMainWindow->resize( w, h );
+    // move and resize fullscreen
+    m_pVoutMainWindow->move( x, y );
+    m_pVoutMainWindow->resize( w, h );
 
-        // ensure the fs controller is also moved
-        if( m_pFscWindow )
-        {
-            m_pFscWindow->moveTo( x, y, w, h );
-        }
+    // ensure the fs controller is also moved
+    if( m_pFscWindow )
+    {
+        m_pFscWindow->moveTo( x, y, w, h );
     }
 }



More information about the vlc-commits mailing list