Moving xkbcomp into the server

Dan Nicholson dbn.lists at gmail.com
Tue Nov 18 03:59:11 PST 2008


On Mon, Nov 17, 2008 at 9:17 PM, Alan Coopersmith
<Alan.Coopersmith at sun.com> wrote:
> Dan Nicholson wrote:
>> One snag I've hit is XStringToKeysym.
>>
>> Is there an equivalent API in the server to do this conversion?
>
> I haven't checked if there's one added now, but I know our Xsun
> pre-xkb keytable parser linked in a copy of the ks_tables.h file
> built in the libX11 build and included a static copy of the
> XStringToKeysym function to do the lookups in it.

Cool, that's what I thought of a little later. However, bringing
XStringToKeysym right in would also mean the Xrm hash table used for
the keysymdb. That seemed a little to nasty.

Then I thought it might work to construct a static table from
XKeysymDB and then dump it into some other lookup structure already in
the server. Can the hash table API in dix/resources.c be used, or does
that tie into the resources system more deeply.

> I wonder if going forward, moving XStringToKeysym into a separate
> library, or putting equivalent functionality in something like
> libxcb-keysyms wouldn't be a better way, to reduce duplication of
> this data/parsing code needed by users of both libX11 & libxcb,
> and the Xserver itself.

Not a bad idea. Nearly everything I've done so far has introduced
duplication from the client side, but I figured I'd try to get it
working before moving orthogonally. It's certainly easier to implement
everything internally to the server rather than introducing a bunch of
external API that might be wrong and can't be removed later.

--
Dan



More information about the xorg mailing list