[PATCH 1/2] kdrive: add protocol mouse option
Olivier Blin
blino at mandriva.com
Thu May 28 12:15:31 PDT 2009
Peter Hutterer <peter.hutterer at who-t.net> writes:
> On Wed, May 27, 2009 at 07:04:16PM +0200, Olivier Blin wrote:
>> Peter Hutterer <peter.hutterer at who-t.net> writes:
>>
>> > On Tue, May 26, 2009 at 03:30:08PM +0200, Olivier Blin wrote:
>> >> kdrive probes a lot of PS/2 protocols for the mouse device, which
>> >> makes the mouse unusable for some seconds after X startup.
>> >> This new "protocol" option allows forcing the mouse protocol.
>> >> It can be used this way:
>> >> Xfbdev -mouse mouse,,protocol=ps/2 -keybd keyboard
>> >>
>> >> diff --git a/hw/kdrive/src/kdrive.h b/hw/kdrive/src/kdrive.h
>> >> index c60559a..c025144 100644
>> >> --- a/hw/kdrive/src/kdrive.h
>> >> +++ b/hw/kdrive/src/kdrive.h
>> >> @@ -220,6 +220,7 @@ struct _KdPointerInfo {
>> >> DeviceIntPtr dixdev;
>> >> char *name;
>> >> char *path;
>> >> + char *force_protocol;
>> >> InputOption *options;
>> >> int inputClass;
>> >>
>> >
>> > wouldn't it be better to name the option "protocol" instead of
>> > "force_protocol" to reflect the cmdline option?
>>
>> I used the "force_" prefix mainly to indicate it is optional, but it's
>> ok to just name it protocol (note that "device" option and pi->path have
>> the same issue, if we want to be picky).
>> Do you want me to resend the patch using "protocol" as field name?
>
> yes. I think it is the better option. We don't need to show in the name that
> it's optional, it's common that an unset option defaults to some
> auto-detected value.
>
> force_protocol is IMO even a bit misleading here, it would indicate that
> you're overriding or enforcing a protocol on the device even if the protocol
> is not supported. When in fact I guess that by using a wrong protocol the
> device simply won't work, right?
>
> Either way, amend with s/force_protocol/protocol/ and we're all good.
Ok, I'm resending the patch then.
Thanks
--
Olivier Blin (blino) - Mandriva
More information about the xorg
mailing list