From 94b2c5e50ef5f52bfd27a821ab9dcec80aa96a73 Mon Sep 17 00:00:00 2001 From: Vlad Zahorodnii Date: Wed, 14 Aug 2024 12:36:06 +0300 Subject: [PATCH] scene: Fix SurfaceItemWayland::freeze() When a wl_surface is unmapped, we need to stop updating the buffer in SurfacePixmapWayland. However, SurfaceItemWayland::freeze() doesn't unset m_surface, so the SurfacePixmapWayland keeps updating the buffer even after the surface is unmapped. This results in some closed windows losing their contents when playing a window closing animation. --- src/scene/surfaceitem_wayland.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/scene/surfaceitem_wayland.cpp b/src/scene/surfaceitem_wayland.cpp index 0b439c8d84..5b1001b06f 100644 --- a/src/scene/surfaceitem_wayland.cpp +++ b/src/scene/surfaceitem_wayland.cpp @@ -196,6 +196,8 @@ void SurfaceItemWayland::freeze() for (auto &[subsurface, subsurfaceItem] : m_subsurfaces) { subsurfaceItem->freeze(); } + + m_surface = nullptr; } void SurfaceItemWayland::handleColorDescriptionChanged()