18 Apr
2025
18 Apr
'25
10:47 a.m.
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. -- https://gitlab.winehq.org/wine/wine/-/merge_requests/7806#note_101383