[vlc-commits] [Git][videolan/vlc][master] qt (windows): fix acrylic on multi monitor setup

Jean-Baptiste Kempf (@jbk) gitlab at videolan.org
Thu Apr 28 10:30:00 UTC 2022



Jean-Baptiste Kempf pushed to branch master at VideoLAN / VLC


Commits:
f71cc89e by Prince Gupta at 2022-04-28T09:12:26+00:00
qt (windows): fix acrylic on multi monitor setup

fixes acrylic effect when secondary monitor is left to the primary

- - - - -


1 changed file:

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


Changes:

=====================================
modules/gui/qt/maininterface/compositor_dcomp_acrylicsurface.cpp
=====================================
@@ -355,8 +355,8 @@ void CompositorDCompositionAcrylicSurface::sync()
         frameY = GetSystemMetrics(SM_CYSIZEFRAME) + GetSystemMetrics(SM_CXPADDEDBORDER);
     }
 
-    m_translateTransform->SetOffsetX(-1 * (float)rect.left - frameX - dx);
-    m_translateTransform->SetOffsetY(-1 * (float)rect.top - frameY - dy);
+    m_translateTransform->SetOffsetX(-1 * ((float)rect.left + frameX + dx));
+    m_translateTransform->SetOffsetY(-1 * ((float)rect.top + frameY + dy));
     m_rootVisual->SetTransform(m_translateTransform.Get());
 }
 
@@ -366,9 +366,11 @@ void CompositorDCompositionAcrylicSurface::updateVisual()
     if (!w || !w->screen())
         return;
 
+    RECT sourceRect {};
+    GetWindowRect(GetShellWindow(), &sourceRect);
+
     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];



View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/f71cc89e7544ee42036df5ae69a16ecf27dba687

-- 
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/f71cc89e7544ee42036df5ae69a16ecf27dba687
You're receiving this email because of your account on code.videolan.org.


VideoLAN code repository instance


More information about the vlc-commits mailing list