GNOME Bugzilla – Bug 725102
Patches to rework the evdev backend's keymap handling
Last modified: 2014-02-27 10:56:05 UTC
These are all on top of the libinput port from bug 720566. The first patch just marks the evdev public API as explicitly not under the same API/ABI guarantees as the rest of Clutter as dicussed on bug 720566.
Created attachment 270191 [details] [review] evdev: Add a conditional define guard to expose API The evdev backend has always been excluded from Clutter's API stability guarantee though in an informal way. This commit makes it explicit by forcing users to define CLUTTER_ENABLE_COMPOSITOR_API.
Created attachment 270192 [details] [review] evdev: Implement keyboard repeat The kernel keyboard repeat functionality isn't configurable and libinput rightfully ignores it. This implements keyboard repeat in userspace allowing for consumers to set the initial delay and repeat intervals.
Created attachment 270193 [details] [review] evdev: Keep latched and locked modifier state when switching keymaps
Created attachment 270194 [details] [review] evdev: Don't update xkb state with pressed keys on keymap change Doing so is unlikely to work reliably. Instead, switching the keymap should be done at a time when no key is currently pressed down, but let's leave that task to higher level code. This allows us to remove key state tracking at yet another level in the stack since higher level code likely already tracks this for other purposes.
Created attachment 270195 [details] [review] evdev: Make the keymap available Make the keymap available so that consumers don't have to duplicate it if they need it.
Review of attachment 270191 [details] [review]: looks good.
Review of attachment 270192 [details] [review]: looks okay. ::: clutter/evdev/clutter-device-manager-evdev.c @@ +307,3 @@ + { + case 1: + cute.
Review of attachment 270193 [details] [review]: looks okay.
Review of attachment 270194 [details] [review]: I'm all for dropping code. looks good.
Review of attachment 270195 [details] [review]: looks good. needs a minor documentation fix. ::: clutter/evdev/clutter-device-manager-evdev.c @@ +1517,3 @@ + * clutter_evdev_get_keyboard_map: (skip) + * @evdev: the #ClutterDeviceManager created by the evdev backend + * missing actual description. ::: clutter/evdev/clutter-evdev.h @@ +86,3 @@ struct xkb_keymap *keymap); +struct xkb_keymap * clutter_evdev_get_keyboard_map (ClutterDeviceManager *evdev); noticed that all the symbols are missing the CLUTTER_AVAILABLE_IN_* annotation. we'll need a commit that adds it.
Also pushed a couple of patches with the versioning annotations and doc tags. Attachment 270191 [details] pushed as 133f95f - evdev: Add a conditional define guard to expose API Attachment 270192 [details] pushed as a6bd53e - evdev: Implement keyboard repeat Attachment 270193 [details] pushed as 945ee57 - evdev: Keep latched and locked modifier state when switching keymaps Attachment 270194 [details] pushed as 2a7d550 - evdev: Don't update xkb state with pressed keys on keymap change Attachment 270195 [details] pushed as d67b38f - evdev: Make the keymap available