[PULL libxkbcommon] Some more fixes and minor enhancements

Daniel Stone daniel at fooishbar.org
Tue Mar 27 06:59:13 PDT 2012

Hi Ran,

On 24 March 2012 15:24, Ran Benita <ran234 at gmail.com> wrote:
> There's some unrelated groups of commits here. I've tried to arrange
> them such that they can be picked selectively if needed.

Great stuff, thanks.  I've pulled most of it, aside from:

>      Remove remaining uses of X11/X.h modifier masks
>      Duplicate the *MapIndex defines from X11/X.h

I'm planning to remove X11 modifier stuff completely, so virtual mods
are the only modifiers exposed through the API.  Since some modifiers
are more useful than others (e.g. you want your keybindings to be
sensitive to the Alt vmod, but not really Left Alt and Right Alt),
this would also give an xkb_map_mod_is_primary() flag that specifies
whether or not you should ignore it.

Either way, the static masks are on their way out.

>      Have a sane fallback strcasecmp

Eh, if your system doesn't have strcasecmp, then I'm pretty sure it's
not my problem.  I've removed the fallback entirely.

>      Remove logging implementation boilerplate

Funny you should mention this in your commit, I do actually have a
context API on the go which would allow you to do this properly, with
xkb_context_log_set_fd() and xkb_context_log_set_level().

> And this is just to make my group switching work. Since it was #ifdef'ed
> away, I assume it's not so simple, but from some testing I did it works.
>      Handle group lock actions

Oh, it probably is that simple, I just hadn't got around to checking
it.  (Nor have I checked modifier latching ...)

> (Sorry for the code-dump style of this; I can only work on this on the
> weekend and holding off seems kinda silly.)

No problem, it's all great stuff! I'll try to push at ~end of the day,
thanks again.  Sorry in advance about the conflicts -- some of it
conflicted with other stuff I'd committed since you branched, and some
are caused by the selective cherry-picking.

In terms of what I have coming up, aside from the context API and vmod
merging, I've got a branch that actually adds multiple-keysym support
that I just need to fix up and put in.  After that, my rough TODO list
is (rough because I just lost my actual TODO file in a tragic vim swap
file accident):
    - add support for a ~/.xkb/rules.local and ~/.xkb/keymap.local
which would override any definitions in the compiled rules and keymap,
    - add a refcnt into the mod/group sections for xkb_state so you
can use a single state object across multiple devices, provided they
share a keymap
    - more warnings when compiling a keymap which uses
deprecated/removed functionality (e.g. message/redirect actions,
non-default key behaviours)
    - xkb_map_foreach_mod() and xkb_state_foreach_active_mod() API +
the group equivalents
    - some other stuff which I've subsequently forgotten ... damnit ...
    - any additions/changes needed to make a GTK+ port work ;)

Did you have anything else in mind that you needed, especially with
the structs/macros having been sealed now?


More information about the xorg-devel mailing list