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.
icc-effect-5.14.5
Martin Gräßlin 2016-03-21 16:24:59 +01:00
parent d847ddf841
commit 53b35e60e3
1 changed files with 9 additions and 0 deletions

View File

@ -451,6 +451,15 @@ void Toplevel::setSurface(KWayland::Server::SurfaceInterface *surface)
}
m_surface = surface;
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,
[this] {
m_surface = nullptr;