XbkGetControls() fails...

Peter Hutterer peter.hutterer at who-t.net
Wed Sep 23 22:37:58 PDT 2009


On Wed, Sep 23, 2009 at 03:16:38PM +0200, Matthias Hopf wrote:
> With the current Xserver XbkGetControls() fails with XkbBadKeyboard.
> 
> Is this a known issue? Is the call deprecated?
> 
> 
> -------------> cut <-----------------
>     XkbDescRec xkb;
>     Display *disp = XOpenDisplay (disp_name ? disp_name : ":0");
>     memset (&xkb, 0, sizeof(xkb));
>     ret = XkbGetControls (disp, XkbAllControlsMask, &xkb);
> -------------> cut <-----------------

Tricky. xkb.device_spec is 0, which used to be the core keyboard (up to
1.5). Now 0 is a reserved ID. If you add
       xkb.device_spec = XkbUseCoreKbd;
before the call it picks the right keyboard. Strictly speaking, the code
sample was never valid, it just happened to work.

Is this one of your test programs or a client that actually failed?
 
Cheers,
  Peter



More information about the xorg mailing list