[PATCH 2/2] compositor: add a way to change the keyboard leds

Pekka Paalanen ppaalanen at gmail.com
Fri Aug 22 01:56:27 PDT 2014


On Fri, 22 Aug 2014 10:13:52 +0300
Giulio Camuffo <giuliocamuffo at gmail.com> wrote:

> 2014-08-21 17:12 GMT+03:00 Pekka Paalanen <ppaalanen at gmail.com>:
> > On Thu, 21 Aug 2014 08:37:17 +0100
> > Daniel Stone <daniel at fooishbar.org> wrote:
> >
> >> Hi,
> >> Last nitpick, sorry ...
> >>
> >> On Wednesday, August 20, 2014, Giulio Camuffo
> >> <giuliocamuffo at gmail.com> wrote:
> >> >
> >> > +       mods_depressed =
> >> > xkb_state_serialize_mods(keyboard->xkb_state.state,
> >> > +
> >> > XKB_STATE_DEPRESSED);
> >> > +       mods_latched =
> >> > xkb_state_serialize_mods(keyboard->xkb_state.state,
> >> > +
> >> > XKB_STATE_LATCHED);
> >> > +       mods_locked =
> >> > xkb_state_serialize_mods(keyboard->xkb_state.state,
> >> > +
> >> > XKB_STATE_LOCKED);
> >> > +       group =
> >> > xkb_state_serialize_group(keyboard->xkb_state.state,
> >> > +                                      XKB_STATE_EFFECTIVE);
> >> > +
> >> > +       num = (1 << keyboard->xkb_info->mod2_mod);
> >> > +       caps = (1 << keyboard->xkb_info->caps_mod);
> >>
> >>
> >> I still don't really believe the non-xkbcommon build should exist,
> >> but shouldn't all this be #ifdef'ed?
> >
> > Looks like that to me, too, we have #ifdef ENABLE_XKBCOMMON it
> > seems, and input.c is full of it. So a simple ifdef around this
> > function would be needed.
> 
> Rather than ifdeffing away the function maybe it's better to just
> return -1 if ENABLE_XKBCOMMON is not defined? That way the API remains
> the same for both cases.

That would indeed match my idea of a simple ifdef. :-)


Thanks,
pq


More information about the wayland-devel mailing list