Alexandros Frantzis (@afrantzis) commented about dlls/winewayland.drv/wayland_pointer.c:
} else if (!needs_relative && pointer->zwp_relative_pointer_v1) {
pointer->accum_x = pointer->accum_y = 0;
I was thinking... if we perform the initialization/zeroing just before enabling relative motion in the if clause above, we reduce (although we do not completely eliminate) the window for the data race mentioned in a previous comment (i.e., some handler running concurrently). This also takes care of the lack of explicit initialization of the accum_x/accum_y members during wayland_pointer init.