Michael Witten f352598e45 evdev.c: Fix/improve discrimination of rel/abs axes
The relevant comment from evdev.c:

We don't allow relative and absolute axes on the same device. The
reason is that some devices (MS Optical Desktop 2000) register both
rel and abs axes for x/y.

The abs axes register min/max; this min/max then also applies to the
relative device (the mouse) and caps it at 0..255 for both axes.
So, unless you have a small screen, you won't be enjoying it much;
consequently, absolute axes are generally ignored.

However, currenly only a device with absolute axes can be registered
as a touch{pad,screen}. Thus, given such a device, absolute axes are
used and relative axes are ignored.

The code for initializing abs/rel axes has been abstracted out into
3 functions, so that initialization in EvdevInit(device) is as easy
as:

    if (pEvdev->flags & (EVDEV_TOUCHPAD | EVDEV_TOUCHSCREEN))
        EvdevInitTouchDevice(device, pEvdev);
    else if (pEvdev->flags & EVDEV_RELATIVE_EVENTS)
        EvdevInitRelClass(device, pEvdev);
    else if (pEvdev->flags & EVDEV_ABSOLUTE_EVENTS)
        EvdevInitAbsClass(device, pEvdev);

Signed-off-by: Michael Witten <mfwitten@gmail.com>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-08-06 14:06:24 +10:00
2008-11-03 13:32:41 +10:30
2009-07-30 09:29:36 +10:00
2009-03-26 10:20:56 +10:00

xf86-input-evdev - Generic Linux input driver for the Xorg X server

Please submit bugs & patches to the Xorg bugzilla:

        https://bugs.freedesktop.org/enter_bug.cgi?product=xorg

All questions regarding this software should be directed at the
Xorg mailing list:

        http://lists.freedesktop.org/mailman/listinfo/xorg

The master development code repository can be found at:

        git://anongit.freedesktop.org/git/xorg/driver/xf86-input-evdev

        http://cgit.freedesktop.org/xorg/driver/xf86-input-evdev

For more information on the git code manager, see:

        http://wiki.x.org/wiki/GitPage
Description
No description provided
Readme 1.2 MiB
Languages
C 96.4%
Makefile 2%
M4 1.4%
Shell 0.2%