xserver/hw
Olivier Fourdan 53399164db xwayland: Use viewport scale for warping coordinates
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>
(cherry picked from commit 0e580872b0)

Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/2151>
2026-04-09 08:59:09 +00:00
..
vfb Don't install Xvfb 2024-04-12 10:40:05 +02:00
xfree86/common Drop Xorg DDX 2024-04-12 10:40:05 +02:00
xwayland xwayland: Use viewport scale for warping coordinates 2026-04-09 08:59:09 +00:00
meson.build Drop Xephyr / kdrive DDX 2024-04-12 10:40:05 +02:00