1
0
Fork 0
mirror of https://github.com/ocornut/imgui.git synced 2026-01-09 23:54:20 +00:00

Backends: SDL2/SDL3: adjusted IME offset to match other backends and master branch. (#6071, #1953)

Amend 1668693bc
This commit is contained in:
ocornut 2026-01-08 14:41:17 +01:00
parent 8103582b65
commit ca46e5d959
3 changed files with 3 additions and 2 deletions

View file

@ -219,7 +219,7 @@ static void ImGui_ImplSDL2_PlatformSetImeData(ImGuiContext*, ImGuiViewport* view
{
SDL_Rect r;
r.x = (int)(data->InputPos.x - viewport->Pos.x);
r.y = (int)(data->InputPos.y - viewport->Pos.y + data->InputLineHeight);
r.y = (int)(data->InputPos.y - viewport->Pos.y);
r.w = 1;
r.h = (int)data->InputLineHeight;
SDL_SetTextInputRect(&r);

View file

@ -214,7 +214,7 @@ static void ImGui_ImplSDL3_UpdateIme()
viewport_pos = viewport->Pos;
SDL_Rect r;
r.x = (int)(data->InputPos.x - viewport_pos.x);
r.y = (int)(data->InputPos.y - viewport_pos.y + data->InputLineHeight);
r.y = (int)(data->InputPos.y - viewport_pos.y);
r.w = 1;
r.h = (int)data->InputLineHeight;
SDL_SetTextInputArea(window, &r, 0);

View file

@ -185,6 +185,7 @@ Docking+Viewports Branch:
gamepad/keyboard to move a window to another viewport. (#9053) [@lut0pia, @ocornut]
- Fixed implicit/fallback "Debug" window from staying visible if once docked. (#9151)
- Backends:
- SDL2, SDL3: adjust IME offset to match other backends and master branch. (#6071, #1953)
- Win32: viewports created by backend forcefully direct messages to
DefWindowProcW() in order to support Unicode text input. (#9099, #3653, #5961) [@ulhc]