diff options
author | Keith Packard <keithp@keithp.com> | 2008-06-18 11:37:00 -0700 |
---|---|---|
committer | Peter Hutterer <peter@cs.unisa.edu.au> | 2008-06-19 17:41:00 +0930 |
commit | cfcb3da75e807dec225cc7ea469e04d2db10bf73 (patch) | |
tree | 25c355b6e31c4cbd03b5640a1a1859835af0c2de /include | |
parent | 3cc5ae6a4f725483612c00fc8bcc2c61607f66a8 (diff) |
Make button down state a bitmask. Master buttons track union of slave buttons
Mixing usage where some parts of the code treated this field as a bitmask
and other parts as an array of card8 was wrong, and as the wire protocol
wanted bitmasks, it was less invasive to switch the newer counting code use
booleans.
Master devices track slave buttons by waiting for all slave buttons to be
released before delivering the release event to the client.
This also removes the state merging code in DeepCopyDeviceClasses -- that
code was changing master device state without delivering any events,
violating protocol invariants. The result will be that existing slave
button state which does not match the master will not be visible through the
master device. Fixing this would require that we synthesize events in this
function, which seems like a bad idea. Note that keyboards have the same
issue.
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
Signed-off-by: Peter Hutterer <peter@cs.unisa.edu.au>
Diffstat (limited to 'include')
-rw-r--r-- | include/inputstr.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/inputstr.h b/include/inputstr.h index 11fe031a0..4c7ec2eb9 100644 --- a/include/inputstr.h +++ b/include/inputstr.h @@ -186,7 +186,7 @@ typedef struct _ButtonClassRec { CARD8 buttonsDown; /* number of buttons currently down */ unsigned short state; Mask motionMask; - CARD8 down[MAP_LENGTH]; + CARD8 down[DOWN_LENGTH]; CARD8 map[MAP_LENGTH]; #ifdef XKB union _XkbAction *xkb_acts; |