[PATCH] Ignore devices that have joystick buttons
Peter Hutterer
peter.hutterer at who-t.net
Tue Nov 25 02:27:06 PST 2014
On Tue, Nov 25, 2014 at 12:16:18PM +0200, Pekka Paalanen wrote:
> On Tue, 25 Nov 2014 02:33:53 +0100
> sobkas at gmail.com (Krzysztof A. Sobiecki) wrote:
>
> > This patch allows libinput to ignore devices that have joystick buttons.
> >
> > Signed-off-by: Krzysztof Sobiecki <sobkas at gmail.com>
> > ---
> > src/evdev.c | 9 +++++++++
> > 1 file changed, 9 insertions(+)
> >
> > diff --git a/src/evdev.c b/src/evdev.c
> > index 36c6859..5f6cc32 100644
> > --- a/src/evdev.c
> > +++ b/src/evdev.c
> > @@ -1274,6 +1274,15 @@ evdev_configure_device(struct evdev_device *device)
> > has_keyboard = 0;
> > has_touch = 0;
> >
> > + for (i = BTN_JOYSTICK; i < BTN_DIGI; i++) {
> > + if (libevdev_has_event_code(evdev, EV_KEY, i)) {
> > + log_info(libinput,
> > + "input device '%s', %s is a joystick, ignoring\n",
> > + device->devname, device->devnode);
> > + return -1;
> > + }
> > + }
> > +
> > if (libevdev_has_event_type(evdev, EV_ABS)) {
> >
> > if ((absinfo = libevdev_get_abs_info(evdev, ABS_X))) {
>
> This is a patch for libinput, not Weston, right?
> Weston also has a src/evdev.c, but the patch doesn't apply.
yeah, it's for libinput. Krzysztof and I discussed it on irc today.
Krzysztof - for next time pls add the repo as [PATCH <repo>]. I usually run
git config --add format.subjectprefix "PATCH `basename $PWD`"
when I clone a new repo then you dont' have to think about it.
Cheers,
Peter
More information about the wayland-devel
mailing list