From 39afe0c31679171b8ce8e22d9bb4703e24915e61 Mon Sep 17 00:00:00 2001 From: Locria Cyber <74560659+iacore@users.noreply.github.com> Date: Sat, 29 Jul 2023 02:15:29 +0000 Subject: [PATCH] Backends: SDL2: Make preedit text display inside IME candidate window Now it's not our responsibility to show it --- backends/imgui_impl_sdl2.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/backends/imgui_impl_sdl2.cpp b/backends/imgui_impl_sdl2.cpp index 389a12010..c50fd0677 100644 --- a/backends/imgui_impl_sdl2.cpp +++ b/backends/imgui_impl_sdl2.cpp @@ -431,6 +431,11 @@ static bool ImGui_ImplSDL2_Init(SDL_Window* window, SDL_Renderer* renderer) SDL_SetHint(SDL_HINT_MOUSE_FOCUS_CLICKTHROUGH, "1"); #endif + // From 2.0.4: A hint that specifies whether certain IMEs should handle text editing internally instead of sending SDL_EVENT_TEXT_EDITING events. +#ifdef SDL_HINT_IME_INTERNAL_EDITING + SDL_SetHint(SDL_HINT_IME_INTERNAL_EDITING, "1"); +#endif + // From 2.0.18: Enable native IME. // IMPORTANT: This is used at the time of SDL_CreateWindow() so this will only affects secondary windows, if any. // For the main window to be affected, your application needs to call this manually before calling SDL_CreateWindow().