mirror of
https://github.com/X11Libre/xserver.git
synced 2026-04-14 17:18:09 +00:00
When Xwayland is used rootful with hidpi, a viewport is in effect and a scale applied. This is however "transparent" to the Xserver which uses unscaled coordinates, so to set the fake cursor position with a viewport and a scale applied, we need to factor the scale to the coordinates before passing the coordinate to the Wayland compositor through the method zwp_locked_pointer_v1_set_cursor_position_hint(). Failing to do that will introduce a shift when warping the cursor position. v2: Use an xwl_window instead of an xwl_seat to improve readability (Michel) Closes: https://gitlab.freedesktop.org/xorg/xserver/-/issues/1875 Signed-off-by: Olivier Fourdan <ofourdan@redhat.com> Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/2145>