The Road to Fcitx 5: 3. You can (NOT) type on wayland (properly).

With a few recent changes on Fcitx 5, Fcitx can now be used to type on Wayland. (Even the window is rendered with EGL! .. ok this is not important)

And as of today, I’d say it is the first and only input method that can display UI correctly on a XWayland setup theoretically, although it’s still pretty useless (See my old post about wayland’s input method).

I used to have a branch on fcitx 4 to support this protocol, but, due to the architecture we can’t render UI on different display easily, so I gave it up and moved this work to Fcitx 5.

As described before, Xwayland client still uses XIM, while Wayland input method protocol need to use Wayland to display GUI. Now, Fcitx can render both X and Wayland input window in order to solve such problem. And to my own knowledge it is also the first one and the only one that can do this correctly.

Here’s a small video to demonstrate this feature. Though, it comes with some limitation, because only in classicui we render window ourselves. Also I have no idea about weston’s overlay input method window placement. I’d say the positioning issue is a bug in weston because fcitx can’t do any placement on wayland.

But, don’t get too excited, as described before, this is the only client app that uses this protocol and as you can see from video the application’s implementation has some problem with backspace (backspace should be send to input method first). Also when your application loses focus, the input context is destroyed which makes it impossible to keep track of the input state in the same application. (Also that silly wobbly animation is done by weston..)

Unfortunately, this is the best we can get for now.

This entry was posted in fcitx development and tagged , , , , . Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *

Note: Commenter is allowed to use '@User+blank' to automatically notify your reply to other commenter. e.g, if ABC is one of commenter of this post, then write '@ABC '(exclude ') will automatically send your comment to ABC. Using '@all ' to notify all previous commenters. Be sure that the value of User should exactly match with commenter's name (case sensitive).