Rémi Bernon (@rbernon) commented about dlls/winewayland.drv/wayland_pointer.c:
return WAYLAND_POINTER_CONSTRAINT_NONE; }
- /* If the confine rect is smaller than the client area prefer to
* lock the pointer if possible, to make the constraint easy
* to enable. */
- intersect_rect(&tmp, &window_clip, &surface->window.client_rect);
- if (EqualRect(&tmp, &surface->window.client_rect))
constraint = WAYLAND_POINTER_CONSTRAINT_CONFINE;
- else
constraint = WAYLAND_POINTER_CONSTRAINT_MAYBE_LOCK;
As we're using pointer locking only for invisible cursor, and as we're switching to relative motion in that case too, what about simply use confining for visible pointers and locking for invisible ones?
This would end up with this function only being about mapping the clipping rect to wayland coordinates, not even having to return anything.