diff --git a/src/backend/wayland/wl_backend.c b/src/backend/wayland/wl_backend.c index 604e1f5..12060ba 100644 --- a/src/backend/wayland/wl_backend.c +++ b/src/backend/wayland/wl_backend.c @@ -57,6 +57,9 @@ * Phase 65: prop_get_transient_for implemented — walks xdg_toplevel->parent * chain and returns the synthetic WNativeWindow ID of the parent view so * dialog windows are correctly identified as transients by the policy layer. + * Phase 66: XDG popup initial configure — schedule configure for + * WLR_XDG_SURFACE_ROLE_POPUP so context menus and autocomplete dropdowns + * can commit their first buffer without stalling on the compositor. */ #ifdef HAVE_CONFIG_H @@ -355,8 +358,18 @@ handle_xdg_new_surface(struct wl_listener *listener, void *data) struct wl_toplevel_view *view; (void)listener; + if (xdg_surface->role == WLR_XDG_SURFACE_ROLE_POPUP) { + /* Phase 66: schedule the initial configure for XDG popups so clients + * that use popups (context menus, autocomplete, tooltips) can commit + * their first buffer without stalling. We do not manage popups in + * the policy layer — they are self-contained transient surfaces. */ + wlr_xdg_surface_schedule_configure(xdg_surface); + wwarning("wl_backend: new XDG popup (scheduled configure)"); + return; + } + if (xdg_surface->role != WLR_XDG_SURFACE_ROLE_TOPLEVEL) - return; /* ignore popups for now */ + return; view = wmalloc(sizeof(*view)); memset(view, 0, sizeof(*view)); diff --git a/tests/wl-smoke-test.sh b/tests/wl-smoke-test.sh index 986568e..ca81d56 100755 --- a/tests/wl-smoke-test.sh +++ b/tests/wl-smoke-test.sh @@ -52,6 +52,9 @@ # CLIENT_SIDE mode ("decoration mode=client_side" logged). # 23. (Phase 65) prop_get_transient_for returns parent XDG surface ID for # dialog windows (build-only check — weston-simple-shm has no transients). +# 24. (Phase 66) XDG popup initial configure scheduled so context menus and +# autocomplete dropdowns can commit first buffer without stalling +# (build-only check — weston-simple-shm creates no popups). # # This test grows as wl_backend vtable slots are implemented. #