Cursor position drifts in native-Wayland Wine games (wp_pointer_warp_v1) — not reproducible under KWin
### Environment
- Hyprland `0.55.2.r78.g34fddc9` (hyprland-git), Aquamarine `0.12.0.r1.g1699271`
- GPU: NVIDIA RTX 3090, driver `610.43.02`
- OS: CachyOS (Wayland session)
- App: Star Citizen via Wine `11.9` (TkG staging-wayland), running on Wine's **native Wayland** driver (`unset DISPLAY`), i.e. a native Wayland client using `wp_pointer_warp_v1`
### Description
In games that use cursor warping (relative camera mode + an absolute-cursor UI like the inventory), the cursor's logical position progressively **drifts out of alignment** with where it's drawn — clicks register offset from the visible cursor. The error **accumulates over time** and **resets when the pointer leaves and re-enters the surface** (e.g. moving to another monitor and back). This points at `wp_pointer_warp_v1` warp handling accumulating error rather than warping to the exact requested position.
### Steps to reproduce
1. Run a Wine game on the native Wayland driver (`unset DISPLAY`) that uses `SetCursorPos`/cursor warping for its UI (e.g. Star Citizen).
2. Alternate between relative-mode (camera/flight) and absolute-mode (inventory/menu) for a while.
3. Observe the cursor hotspot drift from the rendered cursor; clicks land offset.
**Expected:** warped cursor position stays aligned with the rendered cursor.
**Actual:** position drifts cumulatively; only a pointer leave/enter re-syncs it.
### Ruled out
- Monitor global-origin offset (tested with the game's output moved to `0,0`, other monitor disabled) — no effect.
- `cursor:no_hardware_cursors` true vs false — no effect.
- In-game exclusive fullscreen vs borderless — no effect.
- Wine version (reproduced on stable 11.9 and TkG staging-wayland builds that include the post-11.9 pointer-warp work).
### Key evidence (compositor is the only variable)
The **identical** Wine setup (same game, same Wine build, same `wp_pointer_warp_v1` path) run under a **KWin 6.6.5** Wayland session has **zero drift**. Same protocol, same Wine — only the compositor differs — which isolates the issue to Hyprland's `wp_pointer_warp_v1` handling.
关闭于 2026-05-30 1 条评论