Consider change in sub-surface tree as a full damage
A sub-surface changed in a way which needs a repaint. Of course only if the surface is mapped.
This commit is contained in:
parent
d847ddf841
commit
53b35e60e3
1 changed files with 9 additions and 0 deletions
|
@ -451,6 +451,15 @@ void Toplevel::setSurface(KWayland::Server::SurfaceInterface *surface)
|
||||||
}
|
}
|
||||||
m_surface = surface;
|
m_surface = surface;
|
||||||
connect(m_surface, &SurfaceInterface::damaged, this, &Toplevel::addDamage);
|
connect(m_surface, &SurfaceInterface::damaged, this, &Toplevel::addDamage);
|
||||||
|
connect(m_surface, &SurfaceInterface::subSurfaceTreeChanged, this,
|
||||||
|
[this] {
|
||||||
|
// TODO improve to only update actual visual area
|
||||||
|
if (ready_for_painting) {
|
||||||
|
addDamageFull();
|
||||||
|
m_isDamaged = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
);
|
||||||
connect(m_surface, &SurfaceInterface::destroyed, this,
|
connect(m_surface, &SurfaceInterface::destroyed, this,
|
||||||
[this] {
|
[this] {
|
||||||
m_surface = nullptr;
|
m_surface = nullptr;
|
||||||
|
|
Loading…
Reference in a new issue