Alexandros Frantzis (@afrantzis) commented about dlls/winewayland.drv/wayland_pointer.c:
{ struct wayland_pointer *pointer = &process_wayland.pointer;
- /* Ignore absolute motion events if in relative mode. */
- if (pointer->zwp_relative_pointer_v1) return;
- /* Ignore absolute motion events if the pointer is locked and the pointer is
* focused on the lock surface. Relative mode is or will be enabled. The
* latter case may happen if a motion event is being handled immediately
* after an enter event, and the foreground thread has yet to re-enable
* relative motion. */
- if (pointer->zwp_locked_pointer_v1 &&
pointer->focused_hwnd == pointer->constraint_hwnd)
The concept of 'needs relative pointer' is used twice in this MR and also already implemented internally in `wayland_pointer_update_constraint`. In order to keep all such checks in sync, I suggest that we introduce a simple function and use it in all locations:
`static BOOL wayland_pointer_needs_relative(struct wayland_pointer *pointer, HWND hwnd)`
Note that `needs_relative` in `wayland_pointer_update_constraint` is not explicitly expressed in terms of locking, but the condition is effectively equivalent to what you are using (with the exception of when `force_lock == TRUE`, but that's a temporary situation).