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
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;
}