From c49c665edba88461defb82ab0dbab63eab2fc510 Mon Sep 17 00:00:00 2001 From: elexis Date: Wed, 23 Nov 2016 13:29:47 +0000 Subject: [PATCH] Disable SDL text input events before actually focusing a text input element. Patch by echotangoecho, refs #3870. Thus don't add a "t" to the chat input after opening it with the hotkey on unix. The bug still occurs on Windows due to an SDL bug reported upstream by echotangoecho. This was SVN commit r18990. --- source/ps/GameSetup/GameSetup.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/source/ps/GameSetup/GameSetup.cpp b/source/ps/GameSetup/GameSetup.cpp index fa8a92bb8c..b834b630e6 100644 --- a/source/ps/GameSetup/GameSetup.cpp +++ b/source/ps/GameSetup/GameSetup.cpp @@ -684,6 +684,9 @@ static void InitSDL() } atexit(SDL_Quit); + // Text input is active by default, disable it until it is actually needed. + SDL_StopTextInput(); + #if OS_MACOSX // Some Mac mice only have one button, so they can't right-click // but SDL2 can emulate that with Ctrl+Click