add targeted diagnostics to commit_locked, configure, and wl_map dispatch paths

This commit is contained in:
lkn 2026-06-07 17:13:16 +02:00
parent 0b80bc4efb
commit 93d69639dc
2 changed files with 7 additions and 0 deletions

View File

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

View File

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