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.
wilder/Plasma/6.2
Jan Grulich 2 years ago
parent 26a0038d0c
commit 653938e456
  1. 4
      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;
}

Loading…
Cancel
Save