Schedule correct damage and repaints region in addDamageFull for csd clients
Summary: The damage region is in surface-local coordinates, while 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: romangg, kwin Tags: #kwin Maniphest Tasks: T10867 Differential Revision: https://phabricator.kde.org/D24460
This commit is contained in:
parent
28b3b8f0d0
commit
0394f58101
1 changed files with 11 additions and 3 deletions
14
toplevel.cpp
14
toplevel.cpp
|
@ -419,10 +419,18 @@ void Toplevel::addDamageFull()
|
||||||
if (!compositing())
|
if (!compositing())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
damage_region = rect();
|
const QRect bufferRect = bufferGeometry();
|
||||||
repaints_region |= rect();
|
const QRect frameRect = frameGeometry();
|
||||||
|
|
||||||
emit damaged(this, rect());
|
const int offsetX = bufferRect.x() - frameRect.x();
|
||||||
|
const int offsetY = bufferRect.y() - frameRect.y();
|
||||||
|
|
||||||
|
const QRect damagedRect = QRect(0, 0, bufferRect.width(), bufferRect.height());
|
||||||
|
|
||||||
|
damage_region = damagedRect;
|
||||||
|
repaints_region |= damagedRect.translated(offsetX, offsetY);
|
||||||
|
|
||||||
|
emit damaged(this, damagedRect);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Toplevel::resetDamage()
|
void Toplevel::resetDamage()
|
||||||
|
|
Loading…
Reference in a new issue