Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot disable IME or set IME position on X11 #3092

Open
Riateche opened this issue Sep 10, 2023 · 3 comments
Open

Cannot disable IME or set IME position on X11 #3092

Riateche opened this issue Sep 10, 2023 · 3 comments
Labels

Comments

@Riateche
Copy link
Contributor

IME cannot turn off on my system. Even if IME was not enabled for the window, it still receives IME events. set_ime_enabled() has no effect. This can be problematic for applications that don't have IME event handlers.

The relevant code is here. The available styles on my system are: 0x402, 0x404, 0x408, 0x202, 0x204, 0x208. There is no XIM_NONE_STYLE, so the implementation uses the same style (0x402) for "preedit" and "none" modes. None of the available styles actually disable IME.

Setting IME position also doesn't work. There is a comment here, linking to a 20 year old issue. XSetICValues call does, in fact, return an error "preeditAttributes". Does it mean that there is no way to fix it? Setting IME position works in other applications, so it must be possible.

I've played around with other styles. If I enable 0x208 or 0x408, setting IME position actually works, but in these modes the application doesn't receive IME preedit events with actual preedit text (only a single event with an empty preedit, followed by a commit with the final text). So this is also not perfect.

@kchibisov
Copy link
Member

None of the available styles actually disable IME.

Should be sort of resolved once we update to xcb and our implementation of ime stuff, but with xim I'm not sure we can.

I've played around with other styles. If I enable 0x208 or 0x408, setting IME position actually works, but in these modes the application doesn't receive IME preedit events with actual preedit text (only a single event with an empty preedit, followed by a commit with the final text). So this is also not perfect.

That's unfortunatelly how it works, unless you update xlib.

Setting IME position also doesn't work. There is a comment here, linking to a 20 year old issue. XSetICValues call does, in fact, return an error "preeditAttributes". Does it mean that there is no way to fix it? Setting IME position works in other applications, so it must be possible.

update your xlib, it should work with the most recent one since my patch was accepted to fix xlib.

@Riateche
Copy link
Contributor Author

That's great news! I can confirm that IME positioning now works with xlib 1.8.4 (looks like the fix was merged into xlib 1.8.2).

@StarStarJ
Copy link
Contributor

Are there any news for this issue?
the current egui master is unusable with x11, because IME is always activated, even if i don't use it.

I use KDE x11 on debian sid.
Apparently it also happens on other window managers like i3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

No branches or pull requests

4 participants