[PATCH] [xorg/xserver] config: handle device change event properly

Stefan.Kost at nokia.com Stefan.Kost at nokia.com
Thu Mar 24 02:38:45 PDT 2011


Hi,

>-----Original Message-----
>From: ext Peter Hutterer [mailto:peter.hutterer at who-t.net]
>Sent: 21 March, 2011 01:16
>To: Erkki Seppälä
>Cc: xorg-devel at lists.x.org; Kost Stefan (Nokia-MS/Helsinki)
>Subject: Re: [PATCH] [xorg/xserver] config: handle device change event
>properly
>
>On Fri, Mar 18, 2011 at 04:35:36PM +0200, Erkki Seppälä wrote:
>> wakeup_handler in udev.c wasn't dealing with udev change events.
>> There are situations when a device can gain its input capabilities
>> after it has been added to the system and therefore the change events
>> must be handled as well.
>>
>> The change is handled as a consecutive device removal and addition.
>>
>> Signed-off-by: Erkki Seppälä <erkki.seppala at vincit.fi>
>> Signed-off-by: Stefan Kost <Stefan.Kost at nokia.com>
>> ---
>>
>> Stefan, please ask a proper Reported-by tag for the bug from the
>> original reporter.
>>
>>  config/udev.c |    4 ++++
>>  1 files changed, 4 insertions(+), 0 deletions(-)
>>
>> diff --git a/config/udev.c b/config/udev.c
>> index a2f5710..c120747 100644
>> --- a/config/udev.c
>> +++ b/config/udev.c
>> @@ -246,6 +246,10 @@ wakeup_handler(pointer data, int err, pointer
>read_mask)
>>                  device_added(udev_device);
>>              else if (!strcmp(action, "remove"))
>>                  device_removed(udev_device);
>> +            else if (!strcmp(action, "change")) {
>> +                device_removed(udev_device);
>> +                device_added(udev_device);
>> +            }
>>          }
>>          udev_device_unref(udev_device);
>>      }
>> --
>> 1.7.0.4
>
>merged, thank you.
>
>Cheers,
>  Peter

Out of curiosity, is it done in a specific branch? I can (yet) see in on http://cgit.freedesktop.org/xorg/xserver/log/ xorg master.

Stefan



More information about the xorg-devel mailing list