From 655cf4cbc93303c4a7cb8ba0a2ddc8e89dbed075 Mon Sep 17 00:00:00 2001 From: Green Sky Date: Thu, 28 Mar 2024 21:05:44 +0100 Subject: [PATCH] Backends: SDL3: Re-enable calling SDL_StartTextInput()/SDL_StopTextInput() Amend: a7703fe --- backends/imgui_impl_sdl3.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/backends/imgui_impl_sdl3.cpp b/backends/imgui_impl_sdl3.cpp index 2669b71f7461..012623cffe3b 100644 --- a/backends/imgui_impl_sdl3.cpp +++ b/backends/imgui_impl_sdl3.cpp @@ -22,6 +22,7 @@ // CHANGELOG // (minor and older changes stripped away, please see git history for details) +// 2024-03-24: Inputs: Re-enable calling SDL_StartTextInput()/SDL_StopTextInput() as SDL3 no longer enables it by default and should play nicer with IME. // 2024-02-13: Inputs: Fixed gamepad support. Handle gamepad disconnection. Added ImGui_ImplSDL3_SetGamepadMode(). // 2023-11-13: Updated for recent SDL3 API changes. // 2023-10-05: Inputs: Added support for extra ImGuiKey values: F13 to F24 function keys, app back/forward keys. @@ -117,6 +118,9 @@ static void ImGui_ImplSDL3_SetPlatformImeData(ImGuiViewport*, ImGuiPlatformImeDa r.w = 1; r.h = (int)data->InputLineHeight; SDL_SetTextInputRect(&r); + SDL_StartTextInput(); + } else { + SDL_StopTextInput(); } }