popUpMenu: dispatch pending Wayland events after W_MapView to process configure

This commit is contained in:
lkn 2026-06-07 16:59:17 +02:00
parent 88596112f3
commit af4d33032a
2 changed files with 6 additions and 0 deletions

View File

@ -573,6 +573,7 @@ wl_client_view_unmap(WNativeWindow id)
* 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);

View File

@ -450,6 +450,7 @@ static void resizeMenu(PopUpButton * bPtr)
static void popUpMenu(PopUpButton * bPtr)
{
extern void W_WLClientDispatchPending(void);
W_Screen *scr = bPtr->view->screen;
WNativeWindow dummyW;
int x, y;
@ -492,6 +493,10 @@ static void popUpMenu(PopUpButton * bPtr)
* a no-op on Wayland (wl_redisplay returns early when !mapped). */
W_MapView(bPtr->menuView);
/* Process any pending Wayland events (e.g. the configure from a
* NULL-buffer unmap) so the popup is interactable immediately. */
W_WLClientDispatchPending();
/* Pre-render the full menu into the backing as a safety net,
* independent of expose-timing. makeMenuPixmap draws every item
* with relief, text, indicator, and disabled shading. */