Skip to content

[Linux] IME: Inconsistency between X11DBusImeHelper.DetectInputMethod() and AvaloniaX11Platform.ShouldUseXim() #19963

@AlanIWBFT

Description

@AlanIWBFT

Describe the bug

When running Avalonia under XWayland, the recommended way is to set XMODIFIERS for IME, for example, XMODIFIERS=@im=fcitx, and not setting any of GTK_IM_MODULE or QT_IM_MODULE. However, while AvaloniaX11Platform.ShouldUseXim() detects if XMODIFIERS is set, X11DBusImeHelper.DetectInputMethod() does not query its value, so that one of AVALONIA_IM_MODULE, GTK_IM_MODULE or QT_IM_MODULE still needs to be set for enabling IME, which may cause other issues.

To Reproduce

  1. Install sourcegit which is built upon Avalonia 11.3.8 (it has X11PlatformOptions.EnableIme set to true)
  2. Launch with XMODIFIERS=@im=fcitx set
  3. Focus any text box and try to activate IME
  4. Observe the IME does not work

Expected behavior

IME should work with just XMODIFIERS=@im=fcitx set

Avalonia version

11.3.8

OS

Linux

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions