wayland: fix NULL dereference in wl_pointer_query_full

wWorkspaceForceChange passes NULL for root_x/root_y when it only needs
the child window. Add NULL checks before dereferencing these pointers.
This commit is contained in:
Window Maker 2026-05-25 12:51:47 +02:00
parent 5e60df9f3a
commit 172e226947
1 changed files with 2 additions and 2 deletions

View File

@ -6223,8 +6223,8 @@ wl_pointer_query_full(WNativeWindow root,
/* Phase 54: return tracked virtual pointer position. */
(void)root;
if (child_out) *child_out = WNATIVE_NONE;
*root_x = wl_state.pointer_x;
*root_y = wl_state.pointer_y;
if (root_x) *root_x = wl_state.pointer_x;
if (root_y) *root_y = wl_state.pointer_y;
if (buttons_out) *buttons_out = 0;
return wl_state.started ? 1 : 0;
}