WARNING: THIS SITE IS A MIRROR OF GITHUB.COM / IT CANNOT LOGIN OR REGISTER ACCOUNTS / THE CONTENTS ARE PROVIDED AS-IS / THIS SITE ASSUMES NO RESPONSIBILITY FOR ANY DISPLAYED CONTENT OR LINKS / IF YOU FOUND SOMETHING MAY NOT GOOD FOR EVERYONE, CONTACT ADMIN AT ilovescratch@foxmail.com
Skip to content

Commit 962cc23

Browse files
ulhcocornut
authored andcommitted
Backends: Win32: viewports created by backend direct messages to DefWindowProcW() in order to support Unicode text inputs. (#9099, #3653, #5961)
1 parent 772cbfd commit 962cc23

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

backends/imgui_impl_win32.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1372,7 +1372,7 @@ static LRESULT CALLBACK ImGui_ImplWin32_WndProcHandler_PlatformWindow(HWND hWnd,
13721372
// Allow secondary viewport WndProc to be called regardless of current context
13731373
ImGuiContext* ctx = (ImGuiContext*)::GetPropA(hWnd, "IMGUI_CONTEXT");
13741374
if (ctx == NULL)
1375-
return DefWindowProc(hWnd, msg, wParam, lParam); // unlike ImGui_ImplWin32_WndProcHandler() we are called directly by Windows, we can't just return 0.
1375+
return ::DefWindowProcW(hWnd, msg, wParam, lParam); // unlike ImGui_ImplWin32_WndProcHandler() we are called directly by Windows, we can't just return 0.
13761376

13771377
ImGuiIO& io = ImGui::GetIO(ctx);
13781378
ImGuiPlatformIO& platform_io = ImGui::GetPlatformIO(ctx);
@@ -1407,7 +1407,7 @@ static LRESULT CALLBACK ImGui_ImplWin32_WndProcHandler_PlatformWindow(HWND hWnd,
14071407
}
14081408
}
14091409
if (result == 0)
1410-
result = DefWindowProc(hWnd, msg, wParam, lParam);
1410+
result = ::DefWindowProcW(hWnd, msg, wParam, lParam);
14111411
return result;
14121412
}
14131413

docs/CHANGELOG.txt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,12 @@ Other Changes:
5858
selects `VkSwapchainCreateInfoKHR`'s `compositeAlpha` value based on
5959
`cap.supportedCompositeAlpha`. (#8784) [@FelixStach]
6060

61+
Docking+Viewports Branch:
62+
63+
- Backends:
64+
- Win32: viewports created by backend forcefully direct messages to
65+
DefWindowProcW() in order to support Unicode text input. (#9099, #3653, #5961) [@ulhc]
66+
6167

6268
-----------------------------------------------------------------------
6369
VERSION 1.92.5 (Released 2025-11-20)

0 commit comments

Comments
 (0)