wayland: Implement text input protocol

Desktop / GNOME / Mutter - Carlos Garnacho [gnome.org] - 18 January 2018 15:20 EST

This is the implementation of the internal text-input protocol that will be used to communicate IMs (to be implemented by gnome-shell) with clients. The text_input protocol has its own focus expressed through enter/leave events, that will typically follow the keyboard's.

The client will be able to communicate its current status (eg. focus state, cursor rectangle in surface coordinates, text surrounding the cursor position, ...) and will receive commands from the compositor (eg. preedit text, committing a string, ...).

Whenever there is an active input method, the compositor will route key events directly through it. The client will not receive wl_keyboard events if the event is consumed by the IM.

62c971336 wayland: Implement text input protocol
src/Makefile.am | 2 +
src/wayland/meta-wayland-seat.h | 3 +
src/wayland/meta-wayland-text-input.c | 625 ++++++++++++++++++++++++++++++++++
src/wayland/meta-wayland-text-input.h | 46 +++
src/wayland/meta-wayland-versions.h | 1 +
5 files changed, 677 insertions(+)

Upstream: git.gnome.org

  • Share