Backends: Win32: viewports created by backend direct messages to DefWindowProcW() in order to support Unicode text inputs. (#9099, #3653, #5961)

This commit is contained in:
ulhc
2025-11-28 22:45:42 +08:00
committed by ocornut
parent 772cbfd014
commit 962cc2381d
2 changed files with 8 additions and 2 deletions

View File

@@ -1372,7 +1372,7 @@ static LRESULT CALLBACK ImGui_ImplWin32_WndProcHandler_PlatformWindow(HWND hWnd,
// Allow secondary viewport WndProc to be called regardless of current context // Allow secondary viewport WndProc to be called regardless of current context
ImGuiContext* ctx = (ImGuiContext*)::GetPropA(hWnd, "IMGUI_CONTEXT"); ImGuiContext* ctx = (ImGuiContext*)::GetPropA(hWnd, "IMGUI_CONTEXT");
if (ctx == NULL) 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); ImGuiIO& io = ImGui::GetIO(ctx);
ImGuiPlatformIO& platform_io = ImGui::GetPlatformIO(ctx); ImGuiPlatformIO& platform_io = ImGui::GetPlatformIO(ctx);
@@ -1407,7 +1407,7 @@ static LRESULT CALLBACK ImGui_ImplWin32_WndProcHandler_PlatformWindow(HWND hWnd,
} }
} }
if (result == 0) if (result == 0)
result = DefWindowProc(hWnd, msg, wParam, lParam); result = ::DefWindowProcW(hWnd, msg, wParam, lParam);
return result; return result;
} }

View File

@@ -58,6 +58,12 @@ Other Changes:
selects `VkSwapchainCreateInfoKHR`'s `compositeAlpha` value based on selects `VkSwapchainCreateInfoKHR`'s `compositeAlpha` value based on
`cap.supportedCompositeAlpha`. (#8784) [@FelixStach] `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) VERSION 1.92.5 (Released 2025-11-20)