Input: Add postdown to ButtonClassRec
This mirrors that in KeyClassRec: the state of the buttons as posted to GetPointerEvents, rather than the state of the buttons as processed by ProcessOtherEvent and friends. Signed-off-by: Daniel Stone <daniel@fooishbar.org> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
This commit is contained in:
parent
c05f3bc935
commit
18e51911f5
|
@ -1006,10 +1006,14 @@ GetPointerEvents(EventList *events, DeviceIntPtr pDev, int type, int buttons,
|
||||||
kbp->type = DeviceMotionNotify;
|
kbp->type = DeviceMotionNotify;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
if (type == ButtonPress)
|
if (type == ButtonPress) {
|
||||||
kbp->type = DeviceButtonPress;
|
kbp->type = DeviceButtonPress;
|
||||||
else if (type == ButtonRelease)
|
pDev->button->postdown[buttons >> 3] |= (1 << (buttons & 7));
|
||||||
|
}
|
||||||
|
else if (type == ButtonRelease) {
|
||||||
kbp->type = DeviceButtonRelease;
|
kbp->type = DeviceButtonRelease;
|
||||||
|
pDev->button->postdown[buttons >> 3] &= ~(1 << (buttons & 7));
|
||||||
|
}
|
||||||
kbp->detail = buttons;
|
kbp->detail = buttons;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -181,6 +181,7 @@ typedef struct _ButtonClassRec {
|
||||||
unsigned short state;
|
unsigned short state;
|
||||||
Mask motionMask;
|
Mask motionMask;
|
||||||
CARD8 down[DOWN_LENGTH];
|
CARD8 down[DOWN_LENGTH];
|
||||||
|
CARD8 postdown[DOWN_LENGTH];
|
||||||
CARD8 map[MAP_LENGTH];
|
CARD8 map[MAP_LENGTH];
|
||||||
union _XkbAction *xkb_acts;
|
union _XkbAction *xkb_acts;
|
||||||
} ButtonClassRec, *ButtonClassPtr;
|
} ButtonClassRec, *ButtonClassPtr;
|
||||||
|
|
Loading…
Reference in New Issue