[Xcb] Translating XkbApplyMappingChange() et al. to xcb-xkb

LaƩrcio de Sousa laerciosousa at sme-mogidascruzes.sp.gov.br
Mon Oct 20 06:11:17 PDT 2014


Thank you all for the reply!

Looking into libxkbcommon source code, I can see I can use
xcb_xkb_get_controls* stuff to get what I want. The remaining step to
complete my translation to XCB is to build a new XkbControlsRec struct from
the data available in xcb_xkb_get_controls_reply() returned struct. Is
there a trivial way to do this, or should I do it member to member? Ex:

ctrls->mk_dflt_btn = get_controls_reply->mouseKeysDfltBtn;
ctrls->enabled_ctrls = get_controls_reply->enabledControls;
etc.

NOTE: In my use case, this XkbControlsRec will be passed to
XkbDDXChangeControls(). Looking at this function definition, I can see it
only acesses members "enabled_ctrls" and "per_key_repeat" of passed
XkbControlsRec argument, so I think it will be enough to copy only these
members from xcb_xkb_get_controls_reply() returned struct.

2014-10-18 5:02 GMT-03:00 Christian Linhart <chris at demorecorder.com>:

> The XCB protocol definitions for XKB are not finished yet, i.e. they
> contain bugs and some stuff is missing there.
> I have fixed most of that, but not yet submitted my changes.
> Reason for not yet submitting:
> I wait for my XInput stuff to be integrated in upstream before adding more
> pending stuff to our review-queue that's already quite long.
>
> So, you may have to wait until we fix the XKB issues.
> You can of course start your work now, but don't be surprised if some of
> your testcases fail due to errors in the XKB-support of XCB.
>
> Chris
>
>
> On 10/17/14 20:39, Laércio de Sousa wrote:
> > Hi there!
> >
> > I'm currently working on a full XCB backend for xf86-video-nested
> driver. I'm able to translate all Xlib-related code in file xlibclient.c to
> XCB, except some Xkb related parts which force me to maintain a minimal
> XCB-Xlib mix.
> >
> > I would like to translate some Xkb functions used in xf86-video-nested
> to xcb-xkb in order to get rid of Xlib stuff, namely:
> >
> > XkbGetKeyboard()
> >
> > XkbGetControls()
> >
> > XkbApplyMappingChange()
> >
> > XkbDDXChangeControls()
> >
> > XkbCopyDeviceKeymap()
> >
> > Is it currently possible to translate these functions to xcb-xkb? The
> relevant files in which these functions appear are the following:
> >
> >
> http://cgit.freedesktop.org/xorg/driver/xf86-video-nested/tree/src/xlibclient.c
> >
> http://cgit.freedesktop.org/xorg/driver/xf86-video-nested/tree/src/nested_input.c
> > --
> > *Laércio de Sousa*
> > /Orientador de Informática/
> > _Escola Municipal "Professor Eulálio Gruppi"_
> > /Rua Ismael da Silva Mello, 559, Mogi Moderno/
> > /
> > /Mogi das Cruzes - SP/
> > /CEP 08717-390/
> > /
> > Telefone: (11) 4726-8313
> >
> >
> > _______________________________________________
> > Xcb mailing list
> > Xcb at lists.freedesktop.org
> > http://lists.freedesktop.org/mailman/listinfo/xcb
>
> _______________________________________________
> Xcb mailing list
> Xcb at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/xcb
>



-- 
*Laércio de Sousa*
*Orientador de Informática*
*Escola Municipal "Professor Eulálio Gruppi"*
*Rua Ismael da Silva Mello, 559, Mogi Moderno*
*Mogi das Cruzes - SPCEP 08717-390*
Telefone: (11) 4726-8313
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/xcb/attachments/20141020/c8753b14/attachment.html>


More information about the Xcb mailing list