[Xcb] [PATCH libxkbcommon 0/2] X11 support

Ran Benita ran234 at gmail.com
Tue Jan 14 10:25:51 PST 2014

[not an xcb patch, but this is the most relevant list I could think of
so decided to hijack it :]

Currently, xcb applications which want proper keyboard support don't
have many options: essentially, either use Xlib, use core X11 input, or
use xkbcommon without fully integrating with the running X server. None
of which is really nice.

But now that xcb-xkb is usable and enabled by default, we can start
using it and get pretty much on par with Xlib. To do this, we add support
in xkbcommon to read the keymap and keyboard state for any device off the
server, and then maintain it with the relevant XKB events. It works rather
well in my tests.

Note that this is in a new libxkbcommon-x11.so, so that programs which
only use the main library (e.g. most Wayland clients) don't start
depending on xcb.

Ran Benita (2):
  x11: add XKB protocol keymap and state creation support

This does the tedious xcb-xkb -> xkbcommon keymap translation. You can
find the new API at the end of the patch, in the xkbcommon-x11.h file.

  x11: add a couple of tests

You can find an example of how an xcb client using this looks
(see interactive-x11.c).


 Makefile.am                     |   40 ++
 configure.ac                    |   12 +
 src/utils.h                     |   16 +
 src/x11/keymap.c                | 1141 +++++++++++++++++++++++++++++++++++++++
 src/x11/state.c                 |   71 +++
 src/x11/util.c                  |  210 +++++++
 src/x11/x11-priv.h              |   54 ++
 test/.gitignore                 |    2 +
 test/interactive-x11.c          |  360 ++++++++++++
 test/test.h                     |    3 +
 test/x11.c                      |   78 +++
 xkbcommon-x11-uninstalled.pc.in |   10 +
 xkbcommon-x11.pc.in             |   12 +
 xkbcommon/xkbcommon-x11.h       |  163 ++++++
 14 files changed, 2172 insertions(+)
 create mode 100644 src/x11/keymap.c
 create mode 100644 src/x11/state.c
 create mode 100644 src/x11/util.c
 create mode 100644 src/x11/x11-priv.h
 create mode 100644 test/interactive-x11.c
 create mode 100644 test/x11.c
 create mode 100644 xkbcommon-x11-uninstalled.pc.in
 create mode 100644 xkbcommon-x11.pc.in
 create mode 100644 xkbcommon/xkbcommon-x11.h


More information about the Xcb mailing list