wl_map: raise popup to top on remap via wmaker-popup-v1

When a WINGs popup is unmapped (popDownMenu) and remapped (popUpMenu),
the scene node is re-enabled via W_ViewSceneNodeSetEnabledFn, but its
Z-order position stays at its original insertion point. Other surfaces
mapped while the popup was disabled may now sit above it, making the
popup invisible when it reappears.

handle_toplevel_map (which calls wmaker_popup_apply to raise the
popup) only fires on the initial xdg_surface map event, not on
scene-node re-enable. Fix by calling W_WLClientPopupSetPosition on
every topLevel popup map, which triggers wmaker_popup_v1_set_position
→ wmaker_popup_apply → wlr_scene_node_raise_to_top.
This commit is contained in:
lkn 2026-06-07 13:42:25 +02:00
parent 10a22a8484
commit ff86d8055f
1 changed files with 8 additions and 0 deletions

View File

@ -310,6 +310,14 @@ static void wl_map(void *vctx, W_View *view)
W_ViewSceneNodeSetEnabledFn((unsigned long)view->window, 1); W_ViewSceneNodeSetEnabledFn((unsigned long)view->window, 1);
if (view->flags.topLevel) { if (view->flags.topLevel) {
/* Re-apply popup position/raise on remap so the surface appears
* above parent windows. handle_toplevel_map only fires on the
* initial xdg_surface map event, not on scene-node re-enable. */
if (view->flags.popup) {
extern void W_WLClientPopupSetPosition(WNativeWindow w, int x, int y);
W_WLClientPopupSetPosition((WNativeWindow)view->window,
view->pos.x, view->pos.y);
}
wl_redisplay(vctx, view); wl_redisplay(vctx, view);
return; return;
} }