WINGs/wview_wl: stub pointer_grab/ungrab; mark unmanaged toplevels popup

WMPopUpButton's popUpMenu calls viewBackend->pointer_grab which was
NULL on Wayland — calling NULL function pointer crashed WPrefs when
clicking the popup dropdown. Provide no-op stubs (Wayland uses implicit
grab on button press).

Also mark W_CreateUnmanagedTopView views with flags.popup=1 so they
go through the same borderless/skip-taskbar path as editmenu standalone
windows.
This commit is contained in:
Window Maker 2026-05-24 18:05:36 +02:00
parent 3761bef513
commit fd73e94a58
2 changed files with 15 additions and 2 deletions

View File

@ -142,6 +142,7 @@ W_View *W_CreateUnmanagedTopView(W_Screen * screen)
return NULL;
view->flags.topLevel = 1;
view->flags.popup = 1;
return view;
}

View File

@ -700,6 +700,18 @@ static void wl_window_realize(void *vctx, W_View *view, const char *name,
(void)vctx; (void)view; (void)name; (void)class; (void)owner;
}
static void wl_pointer_grab(void *vctx, W_View *view, int owner_events, unsigned long time)
{
(void)vctx; (void)view; (void)owner_events; (void)time;
/* No-op: Wayland uses implicit grab on button press; popup menus
* receive events via the pointer focus mechanism. */
}
static void wl_pointer_ungrab(void *vctx, unsigned long time)
{
(void)vctx; (void)time;
}
static void wl_window_set_geometry(void *vctx, W_View *view)
{
(void)vctx;
@ -747,8 +759,8 @@ const W_ViewBackend W_ViewBackendWL = {
.window_realize = wl_window_realize,
.window_set_geometry = wl_window_set_geometry,
.window_withdraw = wl_window_withdraw,
.pointer_grab = NULL,
.pointer_ungrab = NULL,
.pointer_grab = wl_pointer_grab,
.pointer_ungrab = wl_pointer_ungrab,
.bell = NULL,
.balloon_draw = wl_balloon_draw,
.text_init = wl_text_init,