From 53b35e60e3260f7a8fc51bed19b3b19217b2d1eb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Gr=C3=A4=C3=9Flin?= Date: Mon, 21 Mar 2016 16:24:59 +0100 Subject: [PATCH] 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. --- toplevel.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/toplevel.cpp b/toplevel.cpp index af368b5fb8..73adbf68ef 100644 --- a/toplevel.cpp +++ b/toplevel.cpp @@ -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;