From 567bff403a0e52d32e946310d94689e1258a8475 Mon Sep 17 00:00:00 2001 From: Cacodemon345 Date: Fri, 17 Sep 2021 13:03:55 +0600 Subject: [PATCH] Fix broken text input when SDL2 is using Wayland --- src/common/platform/posix/sdl/sdlglvideo.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/common/platform/posix/sdl/sdlglvideo.cpp b/src/common/platform/posix/sdl/sdlglvideo.cpp index 57c46e908..73ca00b99 100644 --- a/src/common/platform/posix/sdl/sdlglvideo.cpp +++ b/src/common/platform/posix/sdl/sdlglvideo.cpp @@ -150,6 +150,8 @@ namespace Priv { // Enforce minimum size limit SDL_SetWindowMinimumSize(Priv::window, VID_MIN_WIDTH, VID_MIN_HEIGHT); + // Tell SDL to start sending text input on Wayland. + if (strncasecmp(SDL_GetCurrentVideoDriver(), "wayland", 7) == 0) SDL_StartTextInput(); } }