Commit 85777aaa authored by Vlad Zahorodnii's avatar Vlad Zahorodnii
Browse files

[wayland] Ensure that repaints_region is in frame-local coordinates

Summary:
The repaints region is in frame-local coordinates, i.e. relative to the
top-left corner of the frame geometry.

Reviewers: #kwin, romangg

Reviewed By: #kwin, romangg

Subscribers: davidedmundson, kwin

Tags: #kwin

Maniphest Tasks: T10867

Differential Revision: https://phabricator.kde.org/D24457
parent 038509e6
......@@ -389,7 +389,10 @@ void XdgShellClient::setOpacity(double opacity)
void XdgShellClient::addDamage(const QRegion &damage)
{
repaints_region += damage.translated(clientPos());
const int offsetX = m_bufferGeometry.x() - frameGeometry().x();
const int offsetY = m_bufferGeometry.y() - frameGeometry().y();
repaints_region += damage.translated(offsetX, offsetY);
Toplevel::addDamage(damage);
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment