mirror of
https://github.com/X11Libre/xserver.git
synced 2026-04-14 17:18:09 +00:00
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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user