From 93d69639dcdabc8118878149fe4e95c60c4a487d Mon Sep 17 00:00:00 2001 From: lkn Date: Sun, 7 Jun 2026 17:13:16 +0200 Subject: [PATCH] add targeted diagnostics to commit_locked, configure, and wl_map dispatch paths --- WINGs/wclient_wl.c | 6 ++++++ WINGs/wview_wl.c | 1 + 2 files changed, 7 insertions(+) diff --git a/WINGs/wclient_wl.c b/WINGs/wclient_wl.c index fdede06..e8aeb4f 100644 --- a/WINGs/wclient_wl.c +++ b/WINGs/wclient_wl.c @@ -306,6 +306,9 @@ xdg_surface_handle_configure(void *data, struct xdg_surface *xs, uint32_t serial WLClientToplevel *top = data; xdg_surface_ack_configure(xs, serial); top->configured = 1; + wwarning("configure: id=0x%lx pending=(%d,%d) after_configured=%d", + (unsigned long)top->view->window, + top->pending_w, top->pending_h, top->configured); /* If the compositor configured a new size, resize our backing. * (Pending size of 0 means "you decide" — keep current.) */ @@ -416,6 +419,9 @@ wl_client_toplevel_commit_locked(WLClientToplevel *top) /* configured==0 means the surface was unmapped via NULL buffer * and we are waiting for a fresh configure from the compositor. * All buffer attachments are blocked until it arrives. */ + wwarning("commit_locked: id=0x%lx configured=%d buf=%dx%d", + (unsigned long)top->view->window, top->configured, + top->buf ? top->buf->width : 0, top->buf ? top->buf->height : 0); if (!top || !top->configured || !top->buf || !top->buf->wl_buf) return; wl_surface_attach(top->surface, top->buf->wl_buf, 0, 0); diff --git a/WINGs/wview_wl.c b/WINGs/wview_wl.c index 01a9fe4..d25e5b3 100644 --- a/WINGs/wview_wl.c +++ b/WINGs/wview_wl.c @@ -344,6 +344,7 @@ static void wl_map(void *vctx, W_View *view) /* Dispatch any pending Wayland events (e.g. the configure * from a NULL-buffer unmap) so the next commit succeeds. */ extern void W_WLClientDispatchPending(void); + wwarning("wl_map: dispatch pending events"); W_WLClientDispatchPending(); return; }