xf86-input-evdev: Changes to 'master'

Peter Hutterer whot at kemper.freedesktop.org
Mon Jan 23 19:18:30 PST 2012


 src/evdev.c |  113 ++++++++++++++++++++++++++++++++++++++++++++++--------------
 src/evdev.h |    1 
 2 files changed, 89 insertions(+), 25 deletions(-)

New commits:
commit bc2f01ab838119a962f5e5eabb36e33d4c084f2c
Author: Chase Douglas <chase.douglas at canonical.com>
Date:   Thu Jan 19 14:17:34 2012 -0800

    Copy last valuator values into new touch valuator masks
    
    Evdev is a 100% stateful protocol. The following represents three
    touches. Two touches begin and end at the same time at (500, 500) and
    (1000, 1000). The third touch begins after the first two end, and is at
    (500, 500).
    
    ABS_MT_SLOT		0	/* Set touch slot */
    ABS_MT_TRACKING_ID	0	/* New touch with ID 0 in slot 0 */
    ABS_MT_POSITION_X	500	/* Initial X position */
    ABS_MT_POSITION_Y	500	/* Initial Y position */
    ABS_MT_SLOT		1	/* Set touch slot */
    ABS_MT_TRACKING_ID	1	/* New touch with ID 1 in slot 1 */
    ABS_MT_POSITION_X	1000	/* Initial X position */
    ABS_MT_POSITION_Y	1000	/* Initial Y position */
    SYNC				/* End of frame */
    ABS_MT_SLOT		0	/* Go back to slot 0 */
    ABS_MT_TRACKING_ID	-1	/* Touch in slot 0 ended */
    ABS_MT_SLOT		1	/* Go to slot 1 */
    ABS_MT_TRACKING_ID	-1	/* Touch in slot 1 ended */
    SYNC				/* End of frame */
    ABS_MT_SLOT		0	/* Go back to slot 0 */
    ABS_MT_TRACKING_ID	2	/* New touch in slot 0 with ID 2 */
    SYNC				/* End of frame */
    ABS_MT_TRACKING_ID	-1	/* Touch in last slot (0) ended */
    SYNC				/* End of frame */
    
    Note that touch 2 has the same X and Y position as touch 0. This is
    implied because no new value was emitted for slot 0. In fact, Linux will
    not emit an event in the same slot with the same event type and code
    unless the value has changed. Thus, we can only assume that all the MT
    valuators have the same values as they were when they were last sent for
    the given slot.
    
    This change adds an array of valuator mask to hold all the last valuator
    values that came from evdev for each slot. When a new touch begins, all
    the last values are copied into it.
    
    This patch assumes initial axis values of 0 in each slot. Linux and
    mtdev do not provide a facility to query the current values of axes in
    each slot yet. This may cause spurious incorrect touch valuator values
    at the beginning of an X session, but there's nothing we can do about it
    right now.
    
    Signed-off-by: Chase Douglas <chase.douglas at canonical.com>
    Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>



More information about the xorg-commit mailing list