Commit 0394f581 authored by Vlad Zahorodnii's avatar Vlad Zahorodnii
Browse files

Schedule correct damage and repaints region in addDamageFull for csd clients

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:
parent 28b3b8f0
......@@ -419,10 +419,18 @@ void Toplevel::addDamageFull()
if (!compositing())
damage_region = rect();
repaints_region |= rect();
const QRect bufferRect = bufferGeometry();
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()
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