[client,sdl] set touch and pen hints

Prefer the touch API events from SDL.
FreeRDP can handle fallback to mouse events fine in case multitouch is
not available, but fails to map mouse events to touch events.
This commit is contained in:
Armin Novak
2025-12-17 10:50:32 +01:00
parent 32079aa0e6
commit 223d589949

View File

@@ -795,6 +795,10 @@ static int sdl_run(SdlContext* sdl)
SDL_SetHint(SDL_HINT_ALLOW_ALT_TAB_WHILE_GRABBED, "0");
SDL_SetHint(SDL_HINT_VIDEO_X11_NET_WM_BYPASS_COMPOSITOR, "0");
SDL_SetHint(SDL_HINT_PEN_MOUSE_EVENTS, "0");
SDL_SetHint(SDL_HINT_TOUCH_MOUSE_EVENTS, "0");
SDL_SetHint(SDL_HINT_PEN_TOUCH_EVENTS, "1");
SDL_SetHint(SDL_HINT_TRACKPAD_IS_TOUCH_ONLY, "1");
freerdp_add_signal_cleanup_handler(sdl->context(), sdl_term_handler);
sdl->dialog.create(sdl->context());