diff --git a/shell_client.cpp b/shell_client.cpp index 9c9b1ec774..e9d56297ab 100644 --- a/shell_client.cpp +++ b/shell_client.cpp @@ -191,7 +191,6 @@ void ShellClient::init() [this] { m_clientSize = surface()->buffer()->size(); doSetGeometry(QRect(geom.topLeft(), m_clientSize + QSize(borderLeft() + borderRight(), borderTop() + borderBottom()))); - discardWindowPixmap(); } ); connect(s, &SurfaceInterface::unmapped, this, &ShellClient::unmap); diff --git a/toplevel.cpp b/toplevel.cpp index 579bdd7bdf..2fb5448c1f 100644 --- a/toplevel.cpp +++ b/toplevel.cpp @@ -459,9 +459,11 @@ void Toplevel::setSurface(KWayland::Server::SurfaceInterface *surface) using namespace KWayland::Server; if (m_surface) { disconnect(m_surface, &SurfaceInterface::damaged, this, &Toplevel::addDamage); + disconnect(m_surface, &SurfaceInterface::sizeChanged, this, &Toplevel::discardWindowPixmap); } m_surface = surface; connect(m_surface, &SurfaceInterface::damaged, this, &Toplevel::addDamage); + connect(m_surface, &SurfaceInterface::sizeChanged, this, &Toplevel::discardWindowPixmap); connect(m_surface, &SurfaceInterface::subSurfaceTreeChanged, this, [this] { // TODO improve to only update actual visual area