WINGs/wclient_wl: set button.x/y in motion events for widget compat

WMEButton.x is at offset 40, WMEMotion.x is at offset 48. The
scroller widget reads event->u.button.x for motion events (legacy
X11 code where XButtonEvent and XMotionEvent have x at the same
offset). Set both union members so widgets reading either get
correct coordinates.
This commit is contained in:
Window Maker 2026-05-24 17:37:24 +02:00
parent 7efede0274
commit e01dedb833
1 changed files with 4 additions and 0 deletions

View File

@ -695,6 +695,10 @@ pointer_handle_motion(void *data, struct wl_pointer *p, uint32_t time,
ev.u.motion.x_root = (int)wlc_ptr_x;
ev.u.motion.y_root = (int)wlc_ptr_y;
ev.u.motion.state = wlc_ptr_button_state | wlc_ptr_mods;
/* Also set button.x/y — some widgets (wscroller) read motion coords
* via event->u.button.x which is at a different union offset. */
ev.u.button.x = lx;
ev.u.button.y = ly;
W_WL_EnqueueEvent(ctx->scr, &ev, target);
}