mirror of
https://github.com/ocornut/imgui.git
synced 2026-01-11 00:04:24 +00:00
Platform IME: Fixed multi-viewports IME support, affecting SDL backends. (#8648, #8584, #7492, #6341)
Regression from merging bf0f586b6
This commit is contained in:
parent
e11ad6b77e
commit
346f5c6819
2 changed files with 1 additions and 3 deletions
|
|
@ -4158,7 +4158,6 @@ ImGuiContext::ImGuiContext(ImFontAtlas* shared_font_atlas)
|
|||
|
||||
PlatformImeData.InputPos = ImVec2(0.0f, 0.0f);
|
||||
PlatformImeDataPrev.InputPos = ImVec2(-1.0f, -1.0f); // Different to ensure initial submission
|
||||
PlatformImeViewport = 0;
|
||||
|
||||
DockNodeWindowMenuHandler = NULL;
|
||||
|
||||
|
|
@ -5898,7 +5897,7 @@ void ImGui::EndFrame()
|
|||
ImGuiPlatformImeData* ime_data = &g.PlatformImeData;
|
||||
if (g.PlatformIO.Platform_SetImeDataFn != NULL && memcmp(ime_data, &g.PlatformImeDataPrev, sizeof(ImGuiPlatformImeData)) != 0)
|
||||
{
|
||||
ImGuiViewport* viewport = FindViewportByID(g.PlatformImeViewport);
|
||||
ImGuiViewport* viewport = FindViewportByID(ime_data->ViewportId);
|
||||
IMGUI_DEBUG_LOG_IO("[io] Calling Platform_SetImeDataFn(): WantVisible: %d, InputPos (%.2f,%.2f)\n", ime_data->WantVisible, ime_data->InputPos.x, ime_data->InputPos.y);
|
||||
if (viewport == NULL)
|
||||
viewport = GetMainViewport();
|
||||
|
|
|
|||
|
|
@ -2568,7 +2568,6 @@ struct ImGuiContext
|
|||
// Platform support
|
||||
ImGuiPlatformImeData PlatformImeData; // Data updated by current frame. Will be applied at end of the frame. For some backends, this is required to have WantVisible=true in order to receive text message.
|
||||
ImGuiPlatformImeData PlatformImeDataPrev; // Previous frame data. When changed we call the platform_io.Platform_SetImeDataFn() handler.
|
||||
ImGuiID PlatformImeViewport;
|
||||
|
||||
// Extensions
|
||||
// FIXME: We could provide an API to register one slot in an array held in ImGuiContext?
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue