| Summary: | SDL_StartTextInput() does not trigger OSK on Wayland with Phosh | ||
|---|---|---|---|
| Product: | SDL | Reporter: | tizilogic |
| Component: | events | Assignee: | Ryan C. Gordon <icculus> |
| Status: | ASSIGNED --- | QA Contact: | Sam Lantinga <slouken> |
| Severity: | normal | ||
| Priority: | P2 | CC: | dos, etc0de, tizilogic |
| Version: | 2.0.10 | ||
| Hardware: | ARM | ||
| OS: | Linux | ||
|
Description
tizilogic
2020-03-09 19:27:58 UTC
That's correct, nobody has implemented onscreen keyboard support for that setup. Are there other applications that can bring up the on-screen keyboard? If so, how do they do that? I got in contact with the developers and received the following information: """ The protocol to control popup: https://gitlab.freedesktop.org/wayland/wayland-protocols/-/blob/master/unstable/text-input/text-input-unstable-v3.xml the flow is rather simple: the application needs to request a zwp_text_input_v3 object from the manager via https://gitlab.freedesktop.org/wayland/wayland-protocols/-/blob/master/unstable/text-input/text-input-unstable-v3.xml#L433 then it must listen for enter https://gitlab.freedesktop.org/wayland/wayland-protocols/-/blob/master/unstable/text-input/text-input-unstable-v3.xml#L306 and finally commit an enable request https://gitlab.freedesktop.org/wayland/wayland-protocols/-/blob/master/unstable/text-input/text-input-unstable-v3.xml#L87 after editing is over, send a disable request """ Let me know if you need more information After commenting before I also got an example on how this is implemented in GTK: https://gitlab.gnome.org/GNOME/gtk/-/blob/gtk-3-24/modules/input/imwayland.c Also potentially helpful information I just received from the dev that implemented the protocol in the first place (Dorota): """ luckily, I'm in the process of redesigning the protocol (it's broken :(), so if I wrap my head around why I actually made it, I may be able to distill some insight for SDL. If someone interested from SDL filed an issue upstream, I'll give it proper thought: https://gitlab.freedesktop.org/wayland/wayland-protocols/issues """ Isn't this protocol needed for ANY Wayland platform to bring up the on-screen keyboard, like any device with touch where the on-screen keyboard should be used? E.g. I have a linux laptop with touch, when I tap the screen over e.g. a gnome-terminal the gnome 3 onscreen keyboard comes up. I would assume for any SDL2 app it doesn't. Supporting this protocol would likely fix that. So this really doesn't seem to be Phosh-specific, or even mobile device-specific to me, and likely can be tested on any touch-capable device I would assume. This appears to be the current protocol in question: https://fossies.org/linux/misc/gtk+-3.24.20.tar.xz:a/gtk+-3.24.20/modules/input/text-input-unstable-v3-client-protocol.h > Isn't this protocol needed for ANY Wayland platform to bring up the on-screen keyboard, like any device with touch where the on-screen keyboard should be used? Of course. This is by no means phosh specific. > This appears to be the current protocol in question: A more useful link is https://gitlab.freedesktop.org/wayland/wayland-protocols/-/blob/master/unstable/text-input/text-input-unstable-v3.xml which is already in comment #2. |