[X11] Clean up IME inconsistencies
This fixes #19963
- For XWayland apps setting
XMODIFIERS=@im=fcitxalone should make IME work.*_IM_MODULEshould not be required. - Fix where combinations like
GTK_IM_MODULE=none XMODIFIERS=@im=fcitxcan actually enable IME instead of forbid it - this is consistent withAvaloniaX11Platform.EnableIme() - XIM should always be used if none of
IM_MODULEis set (instead of only when they are explicitly set toxim)
You can test this PR using the following package version. 12.0.999-cibuild0060563-alpha. (feed url: https://nuget-feed-all.avaloniaui.net/v3/index.json) [PRBUILDID]
- [x] All contributors have signed the CLA.
XIM should always be used if none of IM_MODULE is set (instead of only when they are explicitly set to xim)
Attempting to use XIM with ibus on plain X11 was freezing the app for me during the initial testing.
I think we should properly parse @im= value and select the IME module accordingly.
I think we should properly parse
@im=value and select the IME module accordingly.
That was my initial implementation (parse @im in X11DBusImeHelper and connect through D-Bus). Yet I was aiming for a cleaner implementation so didn't go with it. Good to know the freezing issue, though XIM+ibus -> freezing should probably be considered as an ibus issue and we should not workaround that in ShouldUseXim(). Connecting through D-Bus should be enough to cover it. I will do it.
P.S.: XIM+fcitx under KDE Plasma X11 session works fine so definitely an ibus issue
You can test this PR using the following package version. 12.0.999-cibuild0060637-alpha. (feed url: https://nuget-feed-all.avaloniaui.net/v3/index.json) [PRBUILDID]
You can test this PR using the following package version. 12.0.999-cibuild0060815-alpha. (feed url: https://nuget-feed-all.avaloniaui.net/v3/index.json) [PRBUILDID]