diff --git a/backends/imgui_impl_sdl3.cpp b/backends/imgui_impl_sdl3.cpp index 9c0d6581c..48e766bcd 100644 --- a/backends/imgui_impl_sdl3.cpp +++ b/backends/imgui_impl_sdl3.cpp @@ -20,6 +20,7 @@ // CHANGELOG // (minor and older changes stripped away, please see git history for details) +// 2025-06-27: IME: avoid calling SDL_StartTextInput() again if already active. (#8727) // 2025-04-22: IME: honor ImGuiPlatformImeData->WantTextInput as an alternative way to call SDL_StartTextInput(), without IME being necessarily visible. // 2025-04-09: Don't attempt to call SDL_CaptureMouse() on drivers where we don't call SDL_GetGlobalMouseState(). (#8561) // 2025-03-30: Update for SDL3 api changes: Revert SDL_GetClipboardText() memory ownership change. (#8530, #7801) @@ -169,7 +170,7 @@ static void ImGui_ImplSDL3_PlatformSetImeData(ImGuiContext*, ImGuiViewport* view SDL_SetTextInputArea(window, &r, 0); bd->ImeWindow = window; } - if (data->WantVisible || data->WantTextInput) + if (!SDL_TextInputActive(window) && (data->WantVisible || data->WantTextInput)) SDL_StartTextInput(window); } diff --git a/docs/CHANGELOG.txt b/docs/CHANGELOG.txt index 5666a03cc..fd705f1c8 100644 --- a/docs/CHANGELOG.txt +++ b/docs/CHANGELOG.txt @@ -43,6 +43,8 @@ Breaking changes: Other changes: +- Backends: SDL3: avoid calling SDL_StartTextInput() again if already active. + (#8727) [@morrazzzz] - Backends: OSX: added ImGuiMouseCursor_Wait and ImGuiMouseCursor_Progress mouse cursor support. (#8739) [@cfillion] - Backends: Vulkan: use nonCoherentAtomSize to align upload_size, fixing