WINGs/wpopupbutton: paint all items in expose, not just highlighted

paintMenuEntry was only called for the highlighted item on expose.
On X11 the X server auto-filled the rest of the window with the
background pixel, so unpainted items looked grey-but-empty.  On
Wayland the buffer starts transparent — unpainted items showed
through to whatever was behind, making the popup invisible.

Iterate all items in the expose handler so the menu's full content
is visible when it first appears.
This commit is contained in:
Window Maker 2026-05-24 19:08:52 +02:00
parent bf356c2567
commit 54c8d585c3
1 changed files with 11 additions and 1 deletions

View File

@ -566,7 +566,17 @@ static void handleActionEvents(WMEvent * event, void *data)
switch (event->type) {
/* called for menuView */
case WME_EXPOSE:
paintMenuEntry(bPtr, bPtr->highlightedItem, True);
{
/* Paint all items: highlighted one with white bg + text,
* the rest with grey bg. X11 used to rely on the X server
* auto-filling the window background; on Wayland we paint
* everything ourselves. */
int n = WMGetArrayItemCount(bPtr->items);
int i;
for (i = 0; i < n; i++) {
paintMenuEntry(bPtr, i, i == bPtr->highlightedItem);
}
}
break;
case WME_LEAVE: