input: fix up usage of button->down, used to be a bitmask, is now an array.
device->button->down used to be a 32-byte bitmask with one bit for each button. This has changed into a 256-byte array, with one byte assigned for each button. Some of the callers were still using this array as a bitmask however, this is fixed with this patch. Thanks to Keith Packard for pointing this out. See also: http://lists.freedesktop.org/archives/xorg/2008-June/036202.html
This commit is contained in:
@@ -4077,15 +4077,11 @@ ProcessPointerEvent (xEvent *xE, DeviceIntPtr mouse, int count)
|
||||
if (xE->u.u.type != MotionNotify)
|
||||
{
|
||||
int key;
|
||||
BYTE *kptr;
|
||||
int bit;
|
||||
|
||||
XE_KBPTR.rootX = pSprite->hot.x;
|
||||
XE_KBPTR.rootY = pSprite->hot.y;
|
||||
|
||||
key = xE->u.u.detail;
|
||||
kptr = &butc->down[key >> 3];
|
||||
bit = 1 << (key & 7);
|
||||
switch (xE->u.u.type)
|
||||
{
|
||||
case ButtonPress:
|
||||
|
||||
Reference in New Issue
Block a user