From 58904a358fc19844d5946f728d71f2044e299de3 Mon Sep 17 00:00:00 2001 From: Vlad Zahorodnii Date: Sun, 10 Sep 2023 16:36:43 +0300 Subject: [PATCH] wayland: Fix copying subsurface order state When merging surface state to a fresh state container, subsurface order state may be lost because subsurfaceOrderChanged can be false. --- src/wayland/surface_interface.cpp | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/src/wayland/surface_interface.cpp b/src/wayland/surface_interface.cpp index 4464aa117d..d080d2c1c0 100644 --- a/src/wayland/surface_interface.cpp +++ b/src/wayland/surface_interface.cpp @@ -558,15 +558,9 @@ void SurfaceState::mergeInto(SurfaceState *target) target->viewport.destinationSizeIsSet = true; } - if (subsurfaceOrderChanged) { - target->subsurface.below = subsurface.below; - target->subsurface.above = subsurface.above; - target->subsurfaceOrderChanged = true; - } - if (subsurfacePositionChanged) { - target->subsurface.position = subsurface.position; - target->subsurfacePositionChanged = true; - } + target->subsurface = subsurface; + target->subsurfaceOrderChanged = subsurfaceOrderChanged; + target->subsurfacePositionChanged = subsurfacePositionChanged; wl_list_insert_list(&target->frameCallbacks, &frameCallbacks);