[patch 1/2] hald modifications for vmware's usb mouse

Dan Nicholson dbn.lists at gmail.com
Mon Jan 28 09:37:12 PST 2008


On Jan 28, 2008 4:56 AM, Vinay Reddy <vinayvinay at gmail.com> wrote:
> Aargh, hit "Send" a little too fast...
>
> I do have commit privileges to get the patch checked in; I just wish
> to get it approved by someone who knows more about HAL.

I would say, sending it to the HAL mailing list would probably help (CC'd).

> On Jan 28, 2008 6:23 PM, Vinay Reddy <vinayvinay at gmail.com> wrote:
> > Hi,
> > Currently, VMware's absolute USB mouse is not correctly tagged by hald
> > (it only gets the "input" capability). Here's a patch that adds the
> > "input.mouse" capability to VMware's absolute USB mouse.
> >
> > Thanks,
> > Vinay
> >
> > diff --git a/hald/linux/device.c b/hald/linux/device.c
> > index b55da25..99dc026 100644
> > --- a/hald/linux/device.c
> > +++ b/hald/linux/device.c
> > @@ -258,9 +258,18 @@ input_test_abs (HalDevice *d, const char *sysfs_path)
> >                 goto out;
> >         num_bits = input_str_to_bitmask (s, bitmask, sizeof (bitmask));
> >
> > -       if (test_bit (ABS_X, bitmask) && test_bit (ABS_Y, bitmask) &&
> > test_bit (ABS_PRESSURE, bitmask)) {
> > -               hal_device_add_capability (d, "input.touchpad");
> > -                goto out;
> > +       if (test_bit (ABS_X, bitmask) && test_bit (ABS_Y, bitmask)) {
> > +                if (test_bit (ABS_PRESSURE, bitmask)) {
> > +                        hal_device_add_capability (d, "input.touchpad");
> > +                        goto out;
> > +                } else {
> > +                        /*
> > +                         * This path is taken by VMware's USB mouse, which has
> > +                         * absolute axes, but no touch/pressure button.
> > +                         */
> > +                        hal_device_add_capability (d, "input.mouse");
> > +                        goto out;
> > +                }
> >          }
> >
> >          /* TODO: Hmm; this code looks sketchy... why do we do
> > !test_bit on the Y axis ?? */
> >
>
>
>
> --
> After silence, that which comes nearest to expressing the
> inexpressible is music - Aldous Huxley
>
> _______________________________________________
> xorg mailing list
> xorg at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/xorg
>


More information about the hal mailing list