[PATCH] Fix for bug Bug 13040 'Make the "cursor" option in xorg.conf useful'
Manuel Reimer
Manuel.Spam at nurfuerspam.de
Sat Nov 6 15:03:40 PDT 2010
Jesse Adkins wrote:
> Updating the ChangeLog isn't necessary, since the driver shouldn't
> have one. It's no big deal, since a future patch can remove the
> ChangeLog.
OK. So I think I'll just add my name to the "AUTHORS" file as soon as
I'm finished with cleaning up this driver.....
> Wouldn't autodetection result in the wrong value being printed to the
> log (since I assume the read comes later) if autodetection finds
> there's a stylus? I notice that there is a log message right below
> where your patch shuts off autodetection in xf86HypInit where the
> device type is reported. The device would be wrong if the
> autodetection hasn't been carried out...
It *is* wrong. The problem is, that the device autodetection is done
whenever a device gets near the tablet.
> Is it possible that the autodetection could be done in xf86HypInit? Am
> I wrong in this?
No, as the used device is detected if the user brings it near the
tablet. It sends something like an "signature", which allowes to switch
between absolute (pen) and relative (puck). The detection is done using
the "pressure value" sent by the device. The stylus is pressure
sensitive while the puck is not. Now the stylus *should* always send a
pressure value above two (even if not touching the tablet) while the
puck always sends zero. For some reason my stylus started to send zero,
too. So my stylus is on relative as long as I only move it over the
tablet. As soon as I touch the tablet, the pressure value rises and the
driver switches to absolute.
What I'm not happy about is the fact, that there are two configuration
options (CURSOR and MODE). They IMHO do nearly the same.
CURSOR on stylus --> absolute
CURSOR on puck --> relative
MODE on absolute --> absolute
MODE on relative --> relative
One of those options should be dropped, but I'm not sure which one.
Maybe the "MODE" option should stay and "CURSOR" should go. If the user
doesn't hardcode a mode in xorg.conf, then autodetect should do this job.
And I created a second patch, which makes this driver *not* crash the
X-Server with segmentation fault if the module has to be unloaded. IMHO
this second patch should be added first, as a crashing driver is pretty
useless. I'll mail this second patch tomorrow.
Yours
Manuel
More information about the xorg-devel
mailing list