ports/171433: x11/xorg: xorg hal: mouse input devices psm0 and usm0 not correctly recognized (" No Device specified, looking for one" )
Henry Hu
henry.hu.sh at gmail.com
Wed Oct 17 07:00:01 UTC 2012
The following reply was made to PR ports/171433; it has been noted by GNATS.
From: Henry Hu <henry.hu.sh at gmail.com>
To: bug-followup at freebsd.org, Martin.Birgmeier at aon.at
Cc:
Subject: Re: ports/171433: x11/xorg: xorg hal: mouse input devices psm0 and
usm0 not correctly recognized ("No Device specified, looking for one")
Date: Wed, 17 Oct 2012 02:55:13 -0400
--e89a8ff1cb2cd097c804cc3bc19d
Content-Type: text/plain; charset=ISO-8859-1
I've made a patch and it seems to solve this problem.
This patch goes to x11-drivers/xf86-input-mouse. It changes
src/mouse.c. I've attached the patch.
It seems like that the hal configuration module correctly added the
"Device" option, in config/hal.c in xorg-server.
The xorg-server copied it into the IDevRec struct's commonOptions
field, in NewInputDeviceRequest() in hw/xfree86/common/xf86Xinput.c
Later, this struct is passed into xf86NewInputDevice(), and then
passed into mouse driver's MousePreInit().
However, there is a problem here. If the ABI version is old,
MousePreInit() calls NewMousePreInit(), and copied some info from
IDevPtr into InputInfoPtr, which is passed into NewMousePreInit().
But it does not copy the commonOptions field. So the options,
including the "Device" option, is lost.
This patch just copies IDevPtr.commonOptions into
InputInfoPtr.options, and then it works.
--
Cheers,
Henry
--e89a8ff1cb2cd097c804cc3bc19d
Content-Type: application/octet-stream; name=patch-mouse-option
Content-Disposition: attachment; filename=patch-mouse-option
Content-Transfer-Encoding: base64
X-Attachment-Id: f_h8e2um130
LS0tIHNyYy9tb3VzZS5jLm9yaWcJMjAxMS0wNi0yNSAwMToyNjo0Ny4wMDAwMDAwMDAgLTA0MDAK
KysrIHNyYy9tb3VzZS5jCTIwMTItMTAtMTcgMDI6Mzk6NDIuMDAwMDAwMDAwIC0wNDAwCkBAIC04
NzEsNiArODcxLDcgQEAKICAgICBwSW5mby0+Y2xvc2VfcHJvYyA9IE5VTEw7CiAgICAgcEluZm8t
PnByaXZhdGVfZmxhZ3MgPSAwOwogICAgIHBJbmZvLT5hbHdheXNfY29yZV9mZWVkYmFjayA9IE5V
TEw7CisgICAgcEluZm8tPm9wdGlvbnMgPSBkZXYtPmNvbW1vbk9wdGlvbnM7CgogICAgIGlmIChO
ZXdNb3VzZVByZUluaXQoZHJ2LCBwSW5mbywgZmxhZ3MpID09IFN1Y2Nlc3MpCiAgICAgewo=
--e89a8ff1cb2cd097c804cc3bc19d--
More information about the freebsd-x11
mailing list