Re: [PATCH] Revamp mouse support in GPE

Florian Boor <[email protected]> Thu, 24 Aug 2006 01:09:30 +0200
Newsgroups gmane.comp.handhelds.gpe
Message-ID <[email protected]>
Hi,

Paul Sokolovsky wrote:
>       I'm working on QEMU support for running OpenEmbedded images.
> Specifically, my aim is to be able to run the same rootfs image on
> both real device and QEMU.

very nice!

> 1. Touchscreen calibration utility (xtscal) is hardcoded to expect
> tocuhscreen device. The obvious solution is just skip it in case
> [there's only] mouse in use. Logic of this detection is a question,
> and I alreday posted about this recently. I ended up backporting
> OE.dev udev rule for /dev/input/touchscreen0 to Familiar 0.8.4 I'm
> doing experiments on and checking for its presence:

Usually detect-stylus should do the trick for you. Maybe we can simply move the
calibration after the stylus detection. After this the tslib environment
variables should be set up. In this case you would know if there is a detected
touchscreen device.


> +if [ -e /dev/input/touchscreen0 ]; then

That could simply be changed to testing if TSLIB_TSDEVICE is not empty and the
file it points to exists.

> 2. It turned out that that tslib conflicts with Xfbdev's -mouse
> switch. While Xfbdev is compiled with both mouse and tslib input
> handlers, the latter appears to have presedence. If there's a device
> passed via -mouse, it is first checked by tslib, and if it's not
> touchscreen, it reports error and keeps device grabbed, not bothering
> to let other handlers try it. (note: this is the behavior which is
> exhibited with Familiar 0.8.4 version of Xfbdev (0.0cvs20050207-r11)).
> 
>   The solution was, while ensuring that TSLIB_TSDEVICE is not set, not
> pass -mouse argument at all. tslib handler then will fail to grab
> something, and normal Xfbdev's detection procedure will happen, and
> /dev/input/mice will be used.

That's really good to know. It might be a good idea to check a more recent
version if this issue still persists. As long as /dev/input/mice is used
automatically it sould be safe to add add this workaround to the upstream
xserver-common package. It should be easy to merge...

Greetings

Florian

-- 
The dream of yesterday                  Florian Boor
is the hope of today                    Tel: 0271-771091-14
and the reality of tomorrow.            Fax: 0271-771091-19
[Robert Hutchings Goddard, 1904]        [email protected]

6C 44 30 4C 43 20 6B 61  16 07 0F AA E6 97 70 A8