wez / wezterm

A GPU-accelerated cross-platform terminal emulator and multiplexer written by @wez and implemented in Rust
https://wezfurlong.org/wezterm/
Other
17.28k stars 781 forks source link

Pre-edit/on-the-spot IME not working #3411

Open musjj opened 1 year ago

musjj commented 1 year ago

What Operating System(s) are you seeing this problem on?

Linux X11

Which Wayland compositor or X11 Window manager(s) are you using?

bspwm 0.9.10-44-gfcfdbb0

WezTerm version

20230321-122932-5a738446

Did you try the latest nightly build to see if the issue is better (or worse!) than your current version?

Yes, and I updated the version box above to show the version of the nightly that I tried

Describe the bug

Pre-edit/on-the-spot IME (the kind you see in normal GUI textboxes) isn't working on Wezterm. I'm pretty sure it worked when I was on Windows.

https://user-images.githubusercontent.com/72612857/229050589-357b5d45-f9de-4b79-886a-be3d4ab22921.mp4

To Reproduce

  1. Install fcitx5 and fcitx5-mozc-ut
  2. Activate input method in the Wezterm terminal.

Configuration

My env:

export XMODIFIERS=@im=fcitx
export GTK_IM_MODULE=fcitx
export QT_IM_MODULE=fcitx
export SDL_IM_MODULE=fcitx
export GLFW_IM_MODULE=ibus # for Kitty

My config:

return {
  use_ime = true
  ime_preedit_rendering = "Builtin"
}

Expected Behavior

How it looks in the web browser:

https://user-images.githubusercontent.com/72612857/229051221-b59d6610-62b3-4963-a865-25d1652f91b0.mp4

Logs

No response

Anything else?

No response

musjj commented 1 year ago

This seems to fix it: fcitx5-configtool -> Addons -> X Input Method Frontend -> Use On The Spot Style Had a temporary issue where the candidate window is drawn at the bottom of the window, but I can't really reproduce it anymore. The only issue is the background of the pre-edit area has a weird color that doesn't match my terminal:

https://user-images.githubusercontent.com/72612857/230802291-8b0fdc86-bc86-4a45-808e-713d5d07844a.mp4

Not sure why it's happening

wez commented 1 year ago

FWIW, all of your mp4 attachments show as corrupt and are no longer playable :-(

musjj commented 1 year ago

Does it not play in the web browser? That's really weird. To be fair I was using my hacky bash script to record it, so I guess I did something wrong with the encoding. Here's a screenshot instead: image Basically, the pre-edit area has this weird yellow background. I would expect it to match the terminal's background.

wez commented 1 year ago

Those videos did work when I first reviewed this issue, but today on my macbook, they don't load in either firefox or safari.

I think the workaround is causing the IME to own rendering that text completely, which is why the colors are different.

jedipunkz commented 1 year ago

I have same issue, and I am using Wayland + Sway on Ubuntu Server 23.04.

This seems to fix it: fcitx5-configtool -> Addons -> X Input Method Frontend -> Use On The Spot Style

I can not find this option.

mopeneko commented 2 weeks ago

https://github.com/wez/wezterm/issues/3411#issuecomment-1501242128

It works on Ubuntu 24.04.1 LTS / fcitx5 5.1.7-1build3 / fcitx5-mozc 2.28.4715.102+dfsg-2.2build7

Thanks!