mirror of
https://github.com/Drezil/imgui.git
synced 2025-07-04 03:58:47 +02:00
Platform IME: add ImGuiPlatformImeData::WantVisible, hide IME when not used. (#2589)
This commit is contained in:
@ -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 = {};
|
||||
|
Reference in New Issue
Block a user