[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
This commit is contained in:
parent
038509e603
commit
85777aaac2
1 changed files with 4 additions and 1 deletions
|
@ -389,7 +389,10 @@ void XdgShellClient::setOpacity(double opacity)
|
||||||
|
|
||||||
void XdgShellClient::addDamage(const QRegion &damage)
|
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);
|
Toplevel::addDamage(damage);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue