From e3e8877aa6aa7ff59c8b74cd852eea31f05699e1 Mon Sep 17 00:00:00 2001 From: rewine Date: Mon, 13 Apr 2026 10:48:17 +0800 Subject: [PATCH] xdg-shell/layer-shell: use same unmap assert --- types/wlr_layer_shell_v1.c | 1 + types/xdg_shell/wlr_xdg_surface.c | 1 + 2 files changed, 2 insertions(+) diff --git a/types/wlr_layer_shell_v1.c b/types/wlr_layer_shell_v1.c index 2d8384981..72d3c4923 100644 --- a/types/wlr_layer_shell_v1.c +++ b/types/wlr_layer_shell_v1.c @@ -394,6 +394,7 @@ static void layer_surface_role_commit(struct wlr_surface *wlr_surface) { layer_surface_reset(surface); assert(!surface->initialized); + assert(!surface->initial_commit); surface->initial_commit = false; } else { surface->initial_commit = !surface->initialized; diff --git a/types/xdg_shell/wlr_xdg_surface.c b/types/xdg_shell/wlr_xdg_surface.c index 8a252d2f8..7b9c99150 100644 --- a/types/xdg_shell/wlr_xdg_surface.c +++ b/types/xdg_shell/wlr_xdg_surface.c @@ -320,6 +320,7 @@ static void xdg_surface_role_commit(struct wlr_surface *wlr_surface) { reset_xdg_surface_role_object(surface); reset_xdg_surface(surface); + assert(!surface->initialized); assert(!surface->initial_commit); surface->initial_commit = false; } else {