[PATCH weston] Add a way to update the keymap

Daniel Stone daniel at fooishbar.org
Mon Oct 7 16:27:00 CEST 2013


Hi,

On 7 October 2013 14:32, Rui Matos <tiagomatos at gmail.com> wrote:
> We'll need something like this in mutter-wayland to allow people to
> add/change their keyboard layouts with gnome-control-center so I
> figured I'd start by implementing the basics in weston first.
>
> There's an implementation for a couple of backends and a fix for the
> client side which would leak on keymap events.

Minor comments aside, this part looks good to me.

> Comments welcome, especially about the state handling - right now I'm
> just reseting the XKB state but I'm not sure this is the correct thing
> to do.

But I'm really not sure about this.  It's really hard to get this
right, especially when you're changing modifier options.  The only
real workable solution I've seen is to pend the actual change until
all keys have been released.  So, in this case, if any keys are down,
just drop the keymap into a separate pending_keymap pointer and have
notify_key() check for pending_keymap and do the actual change after
the last key release.

Cheers,
Daniel


More information about the wayland-devel mailing list