[vlc-commits] [Git][videolan/vlc][master] 2 commits: qt, windows: fix cutoff acrylic with display scaling

Hugo Beauzée-Luyssen (@chouquette) gitlab at videolan.org
Thu Oct 21 20:00:38 UTC 2021



Hugo Beauzée-Luyssen pushed to branch master at VideoLAN / VLC


Commits:
7447a608 by Prince Gupta at 2021-10-21T18:21:45+00:00
qt, windows: fix cutoff acrylic with display scaling

- - - - -
858640bb by Prince Gupta at 2021-10-21T18:21:45+00:00
qt/dcompositor_acrylic: correctly adjust clipping for virtual screen

- - - - -


1 changed file:

- modules/gui/qt/maininterface/compositor_dcomp_acrylicsurface.cpp


Changes:

=====================================
modules/gui/qt/maininterface/compositor_dcomp_acrylicsurface.cpp
=====================================
@@ -344,8 +344,8 @@ void CompositorDCompositionAcrylicSurface::sync()
     GetWindowRect(hwnd(), &rect);
     m_rootClip->SetLeft((float)rect.left + dx);
     m_rootClip->SetRight((float)rect.right + dx);
-    m_rootClip->SetTop((float)rect.top);
-    m_rootClip->SetBottom((float)rect.bottom);
+    m_rootClip->SetTop((float)rect.top + dy);
+    m_rootClip->SetBottom((float)rect.bottom + dy);
     m_rootVisual->SetClip(m_rootClip.Get());
 
     int frameX = 0;
@@ -375,9 +375,10 @@ void CompositorDCompositionAcrylicSurface::updateVisual()
     if (!w || !w->screen())
         return;
 
-    const auto screenRect = w->screen()->availableVirtualGeometry();
-    RECT sourceRect {screenRect.left(), screenRect.top(), screenRect.right(), screenRect.bottom()};
-    SIZE destinationSize {screenRect.width(), screenRect.height()};
+    const int desktopWidth = GetSystemMetrics(SM_CXVIRTUALSCREEN);
+    const int desktopHeight = GetSystemMetrics(SM_CYVIRTUALSCREEN);
+    RECT sourceRect {0, 0, desktopWidth, desktopHeight};
+    SIZE destinationSize {desktopWidth, desktopHeight};
 
     HWND hwndExclusionList[2];
     hwndExclusionList[0] = hwnd();



View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/76641b408b999dcacf0add6d7637c303574f66bb...858640bbef133997031308b4bfa7a46b29992dee

-- 
View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/76641b408b999dcacf0add6d7637c303574f66bb...858640bbef133997031308b4bfa7a46b29992dee
You're receiving this email because of your account on code.videolan.org.




More information about the vlc-commits mailing list