diff --git a/toplevel.cpp b/toplevel.cpp index bfd0098f09..5b3884533c 100644 --- a/toplevel.cpp +++ b/toplevel.cpp @@ -735,8 +735,10 @@ void Toplevel::setSurface(KWaylandServer::SurfaceInterface *surface) connect(m_surface, &SurfaceInterface::destroyed, this, [this] { m_surface = nullptr; + m_surfaceId = 0; } ); + m_surfaceId = surface->id(); emit surfaceChanged(); }