WINGs/wevent_x11: fix MapRequest/ConfigureRequest not reaching WM dispatch

SubstructureRedirect events (MapRequest, ConfigureRequest) are delivered
to the root window. Since the root window has a WINGs view registered
(the WMScreen root view), W_GetViewForXWindow resolves it and
WMHandleEvent dispatches to the view handlers instead of falling through
to extraEventHandler (DispatchEvent).

This caused WINGs-based apps like WPrefs to never have their windows
managed by the WM - the MapRequest was silently consumed.

Fix: skip the view lookup for MapRequest and ConfigureRequest events so
they always reach DispatchEvent via extraEventHandler.
This commit is contained in:
Window Maker 2026-05-25 17:17:03 +02:00
parent b714cb783d
commit 03fe6771cc
1 changed files with 7 additions and 1 deletions

View File

@ -291,7 +291,13 @@ x11_fetch(void *ectx, WMEvent *ev)
}
xev_to_wme(slot, ev);
ev->_view_target = W_GetViewForXWindow(ctx->dpy, slot->xany.window);
/* SubstructureRedirect events (MapRequest, ConfigureRequest) are
* delivered to the root window but must reach the WM's DispatchEvent
* via extraEventHandler. Skip view lookup so they fall through. */
if (slot->type == MapRequest || slot->type == ConfigureRequest)
ev->_view_target = NULL;
else
ev->_view_target = W_GetViewForXWindow(ctx->dpy, slot->xany.window);
}
static Bool