input: Add support for zwp_text_input_v3 and zwp_input_method_v2

Some clients such as gtk+3 require the zwp_text_input_v3 protocol for
input-method handling. This patch adds this protocol support to text-backend and also
modifies weston-keyboard to support zwp_input_method_v2, which is an update
for the v1 protocol and aligned with the updated text-input protocol.

The patch also adds support for zwp_virtual_keyboard_v1, used to emulate the
behaviour of a physical keyboard.

Note that the updated input-method v2 protocol does not support the input-panel interface
as it did on v1. The input panel interface is implemented by desktop-shell to properly
display the virtual keyboard interface.
To avoid depending on both input method v2 and v1 (for input-panel only), this patch adds
a new weston-input-panel internal protocol (a copy of the old interface from input-method v1),
which is then implemented by desktop-shell and used by weston-keyboard when displaying
its window.

Signed-off-by: Andre Moreira Magalhaes (andrunko) <>
2 jobs for text-input-v3 in 1 minute and 31 seconds (queued for 43 seconds)
Status Job ID Name Coverage
  Container Prep
passed #222474


failed #222475


Name Stage Failure
build-native-meson Build
Option b_lundef is: False [default: false]
Found ninja-1.7.2 at /usr/bin/ninja
$ ninja -k0
ninja: error: '/builds/daniels/weston/prefix-wayland-protocols/share/wayland-protocols/unstable/input-method/input-method-unstable-v2.xml', needed by 'protocol/input-method-unstable-v2-protocol.c', missing and no known rule to make it
Uploading artifacts...
build-*/meson-logs: found 2 matching files
prefix-*: found 54 matching files
Uploading artifacts to coordinator... ok id=222475 responseStatus=201 Created token=ecHJdJoQ
ERROR: Job failed: exit code 1