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.
This commit is contained in:
Vlad Zahorodnii 2023-09-10 16:36:43 +03:00
parent 305847625f
commit 58904a358f

View file

@ -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);