Support in Wayland Compositor with rime

Support in Wayland Compositor

Even if you are using only native wayland applications, Xwayland is recommended to be enabled for following reason. If client side input panel in im module does not work, fcitx will fallback to a X11 window, instead of a wayland window. The reason for this is because wayland window can not be placed freely on the screen. On the contrary, even if im module can only pass a coordinate relative to the application window to fcitx, which make the coordinate position doesn't make much sense, if your application window size is "maximized", the coordinate may just be "right" if treated as the global coordinate. This makes X11 window a better option than a randomly placed wayland window.

KDE Plasma

Best setup:

  • KDE Plasma 5.27
  • Environment variables:
    • Set XMODIFIERS=@im=fcitx for XWayland application
    • Start fcitx5 by go to "System settings" -> "Virtual keyboard" -> Select Fcitx 5
    • Do not set GTK_IM_MODULE & QT_IM_MODULE & SDL_IM_MODULE
    • Run chromium/electron application with --enable-features=UseOzonePlatform --ozone-platform=wayland --enable-wayland-ime
  • Caveats:

Support Information:

  • App/Compositor supports text-input-v2 and text-input-v3.
  • Comopositor/Application uses zwp_input_method_v1.
  • 5.27 additionally supports text-input-v1.
  • 5.24 usable zwp_input_method_v1 with fcitx5. Pre-5.24 there are lots of problems, always use fcitx im module instead.
  • Use "Virtual keyboard" KCM to launch fcitx5. This is required to use text-input protocol. If you launch fcitx this way, make sure you do not use "restart" in the tray menu, since the socket passed from KWin can not be reused with the newly restarted fcitx.
posted @ 2024-01-07 12:11  叕叒双又  阅读(80)  评论(0编辑  收藏  举报