lifecycle: detach IME from the game window via ImmAssociateContextEx for CJK Windows #521
No reviewers
Labels
No labels
AMD
audio
bug
confirmed
crash
cutscene
dlss
documentation
duplicate
enhancement
fixed-on-main
frame-generation
hle
input
INTEL
lighting
linux-proton
memory
MULDER
needs-info
needs-logs
needs-rebase
NVIDIA
performance
post-merge
pr-diagnostics
pr-docs
pre-merge
pr-feature
pr-fix
pr-performance
pr-refactor
pr-tests
question
RAYTRACING
relevance
high
relevance
low
relevance
medium
relevance
very-high
rendering
report
roadmap-proposal
saves
series-s
shaders
startup
status
blocked-by-rework
status
needs-test-report
status
needs-triage
status
ready-for-review
status
stale
status
superseded
status
wip
tools
ui
upstream
wontfix
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
TrustNo1/Darner!521
Loading…
Reference in a new issue
No description provided.
Delete branch "aowu/Darner:pr/ime-cjk-detach"
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?
Problem
When
DARNER_IME_ENGLISH=1is enabled,english_input()currently searchesGetKeyboardLayoutListfor theen-USkeyboard layout (0x0409_0409) and callsActivateKeyboardLayout.On CJK Windows installations (e.g. zh-CN with Microsoft Pinyin or Sogou IME, ja-JP, ko-KR), many users do not have a separate
en-USkeyboard layout installed—they toggle English/CJK mode inside the IME itself. As a result,0x0409_0409is not found,english_input()leaves the IME attached, and pressingShift+WASDstill pops up the IME candidate window and eats gameplay input.Fix
Call
imm32.dll::ImmAssociateContextEx(hwnd, NULL, 0)on window creation andWM_SETFOCUSwhenDARNER_IME_ENGLISHis enabled, while keeping the existingen-USlayout activation fallback.HWND; other Windows applications are unaffected.Verification
cargo test -p darner-hle --lib lifecyclepasses (22/22).Shift+WASDno longer triggers IME composition or candidate boxes, while IME remains normal in other apps.Test needed — commit
7d11aa28; what to check: the change described aboveEvidence to post: card + driver, settings, commit tested, before/after (switch off vs on, two runs each), fps median and p99, and one line saying you looked at the picture.
Reply
testingto take this run; it's free again after 24 h with no results.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.