[PATCH 0/37] Last input protocol changes

Daniel Stone daniel at fooishbar.org
Wed May 30 08:31:44 PDT 2012

This patchset makes what will hopefully represent the last of the input
protocol changes.  The small changes are to add enums for key/button
state rather than using boolean integers, as well as converting axis
events to fixed rather than int, so we can have smooth scrolling.

The big ones are the wl_keyboard changes: in particular, we now send the
modifier state at all times from the compositor to the client, rather
than relying on clients to track state.  Fans of Caps Lock may notice
that it now actually works across multiple clients.

The largest change is to add keymap events, in which the compositor now
generates a string representation of the keymap, writes this to an
anonymous fd, and sends these to the clients.  Clients can then mmap the
fd and generate a keymap, rather than having to painstakingly keep the
names synchronised across compositor and clients, as well as any local
modifications.  The keymap event has a format parameter, so those of you
keen to avoid XKB can well do so by defining your own keymap format and
sending that instead.

The X11 and Wayland compositors have been updated to use the keymaps
from their nesting servers.  For those using the DRM compositor, you can
now just set the keyboard layout name in weston.ini and this will work
across all clients.

Fans of Caps Lock may also notice that the DRM compositor now supports
keyboard LEDs, and updates them with the state as X11 does.  In addition
to this, there are plenty of minor cleanups across the board through the
Weston input code.  Shortcut handling was also improved to take account
of things like non-standard modifiers, so should work across a much wider
variety of keymaps.

Comments/feedback welcome; the main one I'm not sure about is the
generation of the anonymous fd in the last Weston keymap patch: this
definitely wants to be moved to shared code, but I'm not sure where.


More information about the wayland-devel mailing list