Xi: fix use of button->down - bitflags instead of int arrays.

The device's button down state array was changed to use DOWN_LENGTH and thus
bitflags for each button in cfcb3da7.

Update the DBSN events to copy this bit-wise state.
Update xkb and Xi to check for the bit flag instead of the array value.

Reported by ajax.

Signed-off-by: Peter Hutterer <peter.hutterer@redhat.com>
This commit is contained in:
Peter Hutterer
2008-11-26 11:15:05 +10:00
parent 180bad8477
commit a85f0d6b98
5 changed files with 7 additions and 15 deletions

View File

@@ -57,9 +57,6 @@ SOFTWARE.
#include "privates.h"
#define BitIsOn(ptr, bit) (((BYTE *) (ptr))[(bit)>>3] & (1 << ((bit) & 7)))
/* If byte[i] in src is non-zero, set bit i in dst, otherwise set bit to 0 */
#define SetBitIf(dst, src, i) \
(src[i]) ? (dst[i/8] |= (1 << (i % 8))) : (dst[i/8] &= ~(1 << (i % 8)));
#define SameClient(obj,client) \
(CLIENT_BITS((obj)->resource) == (client)->clientAsMask)