From 92a461c6873699c601f5b794aac7b756fcc2eb4b Mon Sep 17 00:00:00 2001 From: Vlad Zahorodnii Date: Sun, 14 Nov 2021 16:55:57 +0200 Subject: [PATCH] plugins/screencast: Exclude client-side drop shadows The buffer geometry may include client-side drop shadows, which looks odd when screencasting. --- src/plugins/screencast/windowscreencastsource.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/plugins/screencast/windowscreencastsource.cpp b/src/plugins/screencast/windowscreencastsource.cpp index b050e6d2f4..f851415d32 100644 --- a/src/plugins/screencast/windowscreencastsource.cpp +++ b/src/plugins/screencast/windowscreencastsource.cpp @@ -34,12 +34,12 @@ bool WindowScreenCastSource::hasAlphaChannel() const QSize WindowScreenCastSource::textureSize() const { - return m_window->bufferGeometry().size(); + return m_window->clientGeometry().size(); } void WindowScreenCastSource::render(GLRenderTarget *target) { - const QRect geometry = m_window->bufferGeometry(); + const QRect geometry = m_window->clientGeometry(); QMatrix4x4 projectionMatrix; projectionMatrix.ortho(geometry.x(), geometry.x() + geometry.width(), geometry.y(), geometry.y() + geometry.height(), -1, 1);