Pass XGameUi text entry scope hints to Windows text services #2770
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/2772"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from Marvisak/VIctory. Originally posted by maxence468 on 2026-11-25T20:09:25Z.
Forward the requested input scope to the native edit control before focus and remove its association during teardown. This lets Windows input services choose a keyboard layout for email, URL, numeric, telephone and other documented entry scopes. Unknown values use the default. This PR covers input hints only. Password masking is tracked separately in #2067. All four XGameUi tests passed on Windows, including a hidden native EDIT control accepting each scope and clearing the association. No physical touch keyboard or game session was tested.
Imported from Marvisak/VIctory. Originally posted by cloph-dsp on 2026-11-25T20:26:56Z.
Local verification on Windows / rustc 1.100.0 / MSVC, synthetic inputs only, no game data, no GPU, no clippy/rustup.
AI-assisted (Hy4 flash).
Imported from Marvisak/VIctory. Originally posted by fuzeofficlal on 2026-11-25T20:52:03Z.
Reviewed and verified
bcb809a2on Windows 11 (rustc 1.98.1MSVC) againstmain(13f91ca).Code review
msctf.dll(xgameui.rs:166-169):#[link(name = "msctf", kind = "raw-dylib")]addsmsctf.dll!SetInputScopeto the executable's PE import table. On minimal Windows installs or Wine/Proton prefixes wheremsctf.dllorSetInputScopeis unavailable, process startup will fail instead of degrading gracefully. Dynamically resolving it viaLoadLibraryExW+GetProcAddress(cached inOnceLock, matching optional host DLLs elsewhere invictory-hle) avoids that startup risk.xgameui.rs:238-240):WM_DESTROYguards!edit.is_null()before callingSetInputScope(edit, 0), whereasWM_INITDIALOGpasseseditdirectly without checking!edit.is_null().windows_scopemappings (1, 5, 29, 31, 32, 40, 50, 68) and callingSetInputScopeon the modal dialog thread that owns the edit control look clean.Verification & merge compatibility
cargo test --locked -p victory-hle --lib(3 consecutive full parallel runs): 3/3 passed (147 passed, 0 failed, includinghost_edit_accepts_title_input_scopes).cargo clippy --locked -p victory-hle --all-targets -- -D warnings(default &--all-features): 0 warnings;cargo xtask policy: 184 files ok.13f91caand#2770; text conflict inxgameui.rswith#2067(ES_PASSWORDmasking — complementary changes, straightforward to combine).Imported from Marvisak/VIctory. Originally posted by Marvisak on 2026-11-25T23:13:57Z.
Automated triage for the maintainers.
This PR no longer merges cleanly into
main: it conflicts incrates/victory-hle/src/modules/xgameui.rs. Its content will be reviewed once it is rebased onto currentmain.Generated by Claude Code
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.