From 962cc2381d44ab3699c281880e0b1d30dfe02bb6 Mon Sep 17 00:00:00 2001 From: ulhc <350246356@qq.com> Date: Fri, 28 Nov 2025 22:45:42 +0800 Subject: [PATCH] Backends: Win32: viewports created by backend direct messages to DefWindowProcW() in order to support Unicode text inputs. (#9099, #3653, #5961) --- backends/imgui_impl_win32.cpp | 4 ++-- docs/CHANGELOG.txt | 6 ++++++ 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/backends/imgui_impl_win32.cpp b/backends/imgui_impl_win32.cpp index 37b4d0fbe..44f956885 100644 --- a/backends/imgui_impl_win32.cpp +++ b/backends/imgui_impl_win32.cpp @@ -1372,7 +1372,7 @@ static LRESULT CALLBACK ImGui_ImplWin32_WndProcHandler_PlatformWindow(HWND hWnd, // Allow secondary viewport WndProc to be called regardless of current context ImGuiContext* ctx = (ImGuiContext*)::GetPropA(hWnd, "IMGUI_CONTEXT"); if (ctx == NULL) - return DefWindowProc(hWnd, msg, wParam, lParam); // unlike ImGui_ImplWin32_WndProcHandler() we are called directly by Windows, we can't just return 0. + return ::DefWindowProcW(hWnd, msg, wParam, lParam); // unlike ImGui_ImplWin32_WndProcHandler() we are called directly by Windows, we can't just return 0. ImGuiIO& io = ImGui::GetIO(ctx); ImGuiPlatformIO& platform_io = ImGui::GetPlatformIO(ctx); @@ -1407,7 +1407,7 @@ static LRESULT CALLBACK ImGui_ImplWin32_WndProcHandler_PlatformWindow(HWND hWnd, } } if (result == 0) - result = DefWindowProc(hWnd, msg, wParam, lParam); + result = ::DefWindowProcW(hWnd, msg, wParam, lParam); return result; } diff --git a/docs/CHANGELOG.txt b/docs/CHANGELOG.txt index dfa0a9280..c1129353e 100644 --- a/docs/CHANGELOG.txt +++ b/docs/CHANGELOG.txt @@ -58,6 +58,12 @@ Other Changes: selects `VkSwapchainCreateInfoKHR`'s `compositeAlpha` value based on `cap.supportedCompositeAlpha`. (#8784) [@FelixStach] +Docking+Viewports Branch: + +- Backends: + - Win32: viewports created by backend forcefully direct messages to + DefWindowProcW() in order to support Unicode text input. (#9099, #3653, #5961) [@ulhc] + ----------------------------------------------------------------------- VERSION 1.92.5 (Released 2025-11-20)