Google
  Web www.spinics.net

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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]


Dan Nicholson wrote:
> On Jan 28, 2008 4:56 AM, Vinay Reddy <vinayvinay@xxxxxxxxx> 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).

FWIW, These device characteristics also match those of some ILO hardware input
devices. A patch from HP was made to the linux kernel's driver to handle
this type of device.

--phil

>> On Jan 28, 2008 6:23 PM, Vinay Reddy <vinayvinay@xxxxxxxxx> 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@xxxxxxxxxxxxxxxxxxxxx
>> http://lists.freedesktop.org/mailman/listinfo/xorg
>>
> _______________________________________________
> xorg mailing list
> xorg@xxxxxxxxxxxxxxxxxxxxx
> http://lists.freedesktop.org/mailman/listinfo/xorg

_______________________________________________
xorg mailing list
xorg@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/xorg

[X Forum]     [Devices]     [XFree86]     [XFree86 Newbie]     [Site Home]     [IETF Annouce]     [Security]     [Fontconfig]     [Bugtraq]     [Photo]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Video for Linux]     [Linux RAID]     [Linux Resources]

Powered by Linux