The repaints region is in frame-local coordinates, i.e. relative to the
top-left corner of the frame geometry.
Details
- Reviewers
romangg - Group Reviewers
KWin - Maniphest Tasks
- T10867: XDG WindowGeometry
- Commits
- R108:85777aaac261: [wayland] Ensure that repaints_region is in frame-local coordinates
Diff Detail
- Repository
- R108 KWin
- Lint
Automatic diff as part of commit; lint not applicable. - Unit
Automatic diff as part of commit; unit tests not applicable.
When we call this line:
connect(m_surface, &SurfaceInterface::damaged, this, &Toplevel::addDamage);
TopLevel::addDamage is relative to buffer
When we call
Toplevel::addDamage(damage);
TopLevel::addDamage is relative to the frame
So that's a bit messy. We can ship this for now, but I think we should do the manipulation elsewhere.
Let me try and explain my point again.
In one invocation of TopLevel::addDamage the argument is relative to the buffer (when we connect events from the wayland surface to here)
In another invocation of TopLevel::addDamage the argument is relative to the frame (when we're in the overridden implementation calling the base implementation)
I am saying having one method defined where the argument semantics change depend on where it's called from is confusing.
(That was the state before this patch too, I was just commenting on it whilst I saw it... )
Hmm, I don't follow you. The region that we pass to Toplevel::addDamaged() is always in buffer-local a.k.a. surface-local coordinates, not in frame-local coordinates.