-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Port input method and text input from rootston #4740
Conversation
Looks pretty good at a first glance. Are there any new clients we can look at for testing this, or are we still stuck with the basic demo clients? |
We currently use the input-method example in wlroots and wlchewing to test it. But the former is just an example and can only do some basic tests. The other one is an very early stage implementation using libchewing. |
What work remains before this PR can be merged? I am interested in getting this functionality into Sway and would be happy to help test or patch as needed. @Leo1003 My use case is also Chinese input methods (I use Pinyin, but am familiar with Zhuyin, although rusty); maybe there is something I could do to get wlchewing or another Chinese IME into a more usable state for this? For testing, does ibus not support Wayland? It looks like it has support for V1 of this protocol, at least — see here. |
@SpencerMichaels For what it's worth, I cannot get |
I faced some hangs but @Leo1003 could not reproduce, and I don't have time to look into it (yet). For testing, input-method example in wlroots can be used (with We don't support input-method-unstable-v1. If ibus works, it is likely running under toolkit (gtk or qt) im modules, and if panels appears, it is by xwayland. |
061d7a4
to
ff44c10
Compare
4b8ffbc
to
8646d88
Compare
8646d88
to
d50f998
Compare
d50f998
to
90134cb
Compare
Is there any reason this is not getting merged? I tried it with squeekboard and it makes the on screen keyboard reliably show up on focus of a text field, which is really useful for the tablet mode of a convertible. |
Alright, no rush and thanks for the update. As long as it hasn't been forgotten, I'm happy :) |
The final issue is resolved in #5130, I think this is ready for review. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Is there a reason for making text-input listeners per-text input? While I don't think this was leveraged so far, the relay was the choke point for detecting invalid states, like multiple text-inputs active at the same time. It could prevent broken calls to wlr_input_method_v2_send_activate if needed. Putting that in text-input handler might not be a good idea. There is some overlap in lifetimes of text-inputs (esp. when switching clients) that should be carefully analyzed. As a note not pertaining the actual patch, it seems that the text-input v3 protocol, and by extension, the input-method v2 were botched, and i would advise to have a way to drop them in the future in favor of the fixed version. Here's some background: https://gitlab.freedesktop.org/wayland/wayland-protocols/-/merge_requests/19 https://gitlab.freedesktop.org/wayland/wayland-protocols/-/merge_requests/16 and, to a lesser extent, conditional on not having virtual-keyboard widely accepted: https://gitlab.freedesktop.org/wayland/wayland-protocols/issues/12 I would appreciate if those MRs could get more reviews, to justify releasing a fixed revision and moving on to the fix without having to implement the bad version first. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall this looks good! Here are a few comments.
Can you also rebase against master? |
Ok, I will apply those changes and rebase ASAP. |
This ports swaywm/wlroots#1203, swaywm/wlroots#1303, swaywm/wlroots#1308, swaywm/wlroots#1759 rootston part to sway. Co-Authored-By: Leo Chen <[email protected]>
This make sure pending focused surface listener is not reachable from old surface.
Rebased against master and changes are applied! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for your work!
Sorry to dig up an old thread, but how is this actually used? The release for Sway 1.5 states:
but doesn't provide an example. Nor does it seem that anything was added to the manpages or Wiki. Does anyone have a working example? |
Note to others. Adding the following to your sway
Also make sure to set these environment variables somewhere: # Fish shell
set -x GTK_IM_MODULE 'fcitx'
set -x QT_IM_MODULE 'fcitx'
set -x XMODIFIERS '@im=fcitx' I can now type 日本語 and other things in my Wayland windows. Unfortunately it doesn't work (not even the language switching) if I'm focused on an Here are the Arch Linux packages I have installed for this:
|
@fosskers You are still using the dbus frontend of fcitx5, run this command
There are 5 frontend provided by fcitx, |
This ports basic input method support from rootston to sway.
Origin from: