From 653938e4560df20de8b652e66848d4c981d0723a Mon Sep 17 00:00:00 2001 From: Jan Grulich Date: Mon, 13 May 2024 08:48:04 +0200 Subject: [PATCH] plugins/screencast: fix damage region position Damage reported from the output is output-local and therefore doesn't need to be translated. I tested this with Chromium, where the damage region on my 3-monitor setup was always -4k something on the right screen, -2k on the middle one and correct on the left screen. With this change I can confirm that the position is now correctly reported for the right screen. --- src/plugins/screencast/outputscreencastsource.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/plugins/screencast/outputscreencastsource.cpp b/src/plugins/screencast/outputscreencastsource.cpp index 45439dfce5..b3eb2299e0 100644 --- a/src/plugins/screencast/outputscreencastsource.cpp +++ b/src/plugins/screencast/outputscreencastsource.cpp @@ -86,7 +86,7 @@ uint OutputScreenCastSource::refreshRate() const void OutputScreenCastSource::report(const QRegion &damage) { if (!damage.isEmpty()) { - Q_EMIT frame(scaleRegion(damage.translated(-m_output->geometry().topLeft()), m_output->scale())); + Q_EMIT frame(scaleRegion(damage, m_output->scale())); } } @@ -97,7 +97,7 @@ void OutputScreenCastSource::resume() } connect(m_output, &Output::outputChange, this, &OutputScreenCastSource::report); - report(m_output->geometry()); + report(m_output->rect()); m_active = true; }