mouse: Make pointer warp emulation via relative mode available to all platforms

Move the Wayland pointer warp emulation code up to the SDL mouse layer, and activate it when a client attempts to warp a hidden mouse cursor when the hint is set.

testrelative adds the ability to test the warp emulation activation/deactivation with the --warp parameter and 'c' key for toggling cursor visibility.
This commit is contained in:
Frank Praznik
2024-07-24 17:43:02 -04:00
parent 92667e3066
commit 66eb2ea443
8 changed files with 212 additions and 122 deletions

View File

@@ -3596,3 +3596,7 @@ typedef SDL_JoystickGUID, SDL_GUID;
- SDL_OnApplicationDidBecomeActive
+ SDL_OnApplicationDidEnterForeground
(...)
@@
@@
- SDL_HINT_VIDEO_WAYLAND_EMULATE_MOUSE_WARP
+ SDL_HINT_MOUSE_EMULATE_WARP_WITH_RELATIVE