Add GTK_IM_MODULE to fcitx environment defaults - #11206
tonyfarson wants to merge 1 commit into
Conversation
QT_IM_MODULE, XMODIFIERS, and SDL_IM_MODULE are set for fcitx5, but GTK_IM_MODULE is not. Without it, GTK-based and Chromium/Electron apps fall back to the legacy XIM protocol instead of fcitx5's module, which is a known source of dropped/eaten keystrokes -- reproduced here with an Electron app (Dabble) whose live spellcheck triggers enough IME composition-state queries to lose characters under XIM, and confirmed fixed by setting GTK_IM_MODULE=fcitx. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
|
Closing this — a re-test found the premise doesn't hold up, and I'd rather withdraw it than have reviewers spend time on something I can no longer stand behind. What I got wrong: I diagnosed Dabble's dropped keystrokes as XIM fallback from a missing Dabble (Electron, native Wayland/Ozone) connects to fcitx5 through the Wayland text-input protocol directly — it never goes through GTK's immodule system, so Where the actual bug lives: Chromium/Electron's That's an app-level (Dabble should offer/default to XWayland, or Electron should fix |
What
default/environment.d/10-omarchy-fcitx.confsetsINPUT_METHOD,QT_IM_MODULE,XMODIFIERS, andSDL_IM_MODULEfor fcitx5, but notGTK_IM_MODULE. This adds it.Why
Without
GTK_IM_MODULE, GTK-based and Chromium/Electron apps fall backto the legacy XIM input protocol instead of fcitx5's module. XIM has a
long-documented history of dropped/eaten keystrokes under fcitx
(fcitx/fcitx5#1000 and others), and since the manual notes fcitx5 runs
"as part of every session" on Omarchy — not just for users who've added
a CJK input engine — this affects any GTK/Electron app on a stock
install, whether or not the user ever touches input methods.
I ran into this as consistently dropped characters in an Electron app
(Dabble, a writing app) — worse specifically when its live spellcheck
was on, which makes sense: spellcheck triggers far more IME
composition-state queries than plain typing, and that extra traffic is
exactly what the XIM fallback path handles poorly.
Verification
GTK_IM_MODULEwas unset in a live session while the otherthree variables were present, tracing back to this file.
GTK_IM_MODULE=fcitxvia a user-levelenvironment.doverride,logged out and back in, and the dropped-keystroke behavior in the
affected app went away with spellcheck re-enabled.
./test/allpasses (test/cli,test/shellboth green after fixingan unrelated local
misenode-version gap in my dev environment).Happy to add anything else that would help evaluate this for a future
dot release.