From ff86d8055f0f432aeb18d58853d2643951f02578 Mon Sep 17 00:00:00 2001 From: lkn Date: Sun, 7 Jun 2026 13:42:25 +0200 Subject: [PATCH] wl_map: raise popup to top on remap via wmaker-popup-v1 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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. --- WINGs/wview_wl.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/WINGs/wview_wl.c b/WINGs/wview_wl.c index f98b3d3..5bd87ac 100644 --- a/WINGs/wview_wl.c +++ b/WINGs/wview_wl.c @@ -310,6 +310,14 @@ static void wl_map(void *vctx, W_View *view) W_ViewSceneNodeSetEnabledFn((unsigned long)view->window, 1); 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); return; }