From 2a3dcecfae65386d82c4dd1b8d3e73781bd385d4 Mon Sep 17 00:00:00 2001 From: Alibek Omarov Date: Mon, 8 Dec 2025 19:05:38 +0500 Subject: [PATCH] engine: platform: sdl2: add a note about useless and broken WarpMouseInWindow on Wayland --- engine/platform/sdl2/sys_sdl2.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/engine/platform/sdl2/sys_sdl2.c b/engine/platform/sdl2/sys_sdl2.c index d716ce79..1d6dd5ac 100644 --- a/engine/platform/sdl2/sys_sdl2.c +++ b/engine/platform/sdl2/sys_sdl2.c @@ -123,6 +123,14 @@ void SDLash_Init( const char *basedir ) #endif // SDL_HINT_MOUSE_TOUCH_EVENTS SDL_SetHint( SDL_HINT_TOUCH_MOUSE_EVENTS, "0" ); + // NOTE: setting this hint makes no sense, as of course + // it doesn't make warps magically work in normal, non-relative mode + // there is pointer_warp_v1 extension but it's only implemented in SDL3 + // at the time of writing, so there it should just work if compositor + // supports it + + // SDL_SetHint( SDL_HINT_VIDEO_WAYLAND_EMULATE_MOUSE_WARP, "1" ); + SDL_StopTextInput(); SDLash_InitCursors();