mirror of
https://github.com/ocornut/imgui.git
synced 2026-01-12 00:14:20 +00:00
Platform IME: add ImGuiPlatformImeData::WantVisible, hide IME when not used. (#2589)
This commit is contained in:
parent
1cbfe93520
commit
29a8ee0826
4 changed files with 10 additions and 0 deletions
|
|
@ -4149,6 +4149,7 @@ void ImGui::NewFrame()
|
|||
|
||||
// Platform IME data: reset for the frame
|
||||
g.PlatformImeDataPrev = g.PlatformImeData;
|
||||
g.PlatformImeData.WantVisible = false;
|
||||
|
||||
// Mouse wheel scrolling, scale
|
||||
UpdateMouseWheel();
|
||||
|
|
@ -11510,6 +11511,8 @@ static void SetPlatformImeDataFn_DefaultImpl(ImGuiViewport* viewport, ImGuiPlatf
|
|||
if (hwnd == 0)
|
||||
return;
|
||||
|
||||
::ImmAssociateContextEx(hwnd, NULL, data->WantVisible ? IACE_DEFAULT : 0);
|
||||
|
||||
if (HIMC himc = ::ImmGetContext(hwnd))
|
||||
{
|
||||
COMPOSITIONFORM composition_form = {};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue