From 88596112f3e4ceda3c57725bc6abe5b5f05d975b Mon Sep 17 00:00:00 2001 From: lkn Date: Sun, 7 Jun 2026 16:55:32 +0200 Subject: [PATCH] wl_client_view_unmap: NULL buffer without configured=0; surface stays configured after first configure --- WINGs/wclient_wl.c | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/WINGs/wclient_wl.c b/WINGs/wclient_wl.c index 2140afd..f15cd82 100644 --- a/WINGs/wclient_wl.c +++ b/WINGs/wclient_wl.c @@ -568,15 +568,12 @@ wl_client_view_unmap(WNativeWindow id) { WLClientToplevel *top = wlc_top_find(id); if (!top || !top->surface) return; - /* Attach NULL + commit: the standard Wayland way to hide a surface. - * This triggers a wlroots xdg unmap and the compositor sends a new - * configure event. We set configured=0 so the next commit waits - * for the configure. The popup reopen path (wl_map) calls - * wl_display_dispatch_pending after redisplay to ensure the - * configure is processed before the user can interact. */ + /* Attach NULL + commit to hide the surface. The xdg_surface + * stays configured after the first configure/ack, so subsequent + * commits do not need a new configure event. */ wl_surface_attach(top->surface, NULL, 0, 0); wl_surface_commit(top->surface); - top->configured = 0; + top->mapped = 0; if (top->ctx && top->ctx->display) wl_display_flush(top->ctx->display); }