[PATCH mouse v2] Fix wrong read Protocol and Device from xorg.conf

Peter Hutterer peter.hutterer at who-t.net
Mon Jun 27 22:39:33 PDT 2011


On Tue, Jun 14, 2011 at 08:04:45PM +0600, Alexandr Shadchin wrote:
> Add call xf86CollectInputOptions() before using pInfo->options.
> 
> Signed-off-by: Alexandr Shadchin <Alexandr.Shadchin at gmail.com>
> ---
>  src/mouse.c |    2 ++
>  1 files changed, 2 insertions(+), 0 deletions(-)
> 
> diff --git a/src/mouse.c b/src/mouse.c
> index c3498ea..e3d3d9f 100644
> --- a/src/mouse.c
> +++ b/src/mouse.c
> @@ -927,6 +927,8 @@ MousePreInit(InputDriverPtr drv, InputInfoPtr pInfo, int flags)
>      pMse->PostEvent = MousePostEvent;
>      pMse->CommonOptions = MouseCommonOptions;
>  
> +    COLLECT_INPUT_OPTIONS(pInfo, NULL);
> +
>      /* Find the protocol type. */
>      protocol = xf86SetStrOption(pInfo->options, "Protocol", NULL);
>      if (protocol) {
> -- 
> 1.7.5

sorry for the late answer, quite busy here.

This is the simple way out. on ABI 12 the current code works so I suspect
the bug you're seeing is ABI < 12 (which would be nice to add to the commit
message btw).

Because the call is superfluous, it'd be better to put it into the ABI < 12
PreInit function, before the new function is being called (and potentially
remove the call from there. thanks.

Cheers,
  Peter


More information about the xorg-devel mailing list