Input: Fix proximity events with valuators
Initialise num_events to 1, so we always send a proximity event, and then optionally valuator events. Also make sure mieq can deal with valuator events sent after proximity events.
This commit is contained in:
parent
a14a143832
commit
5b02a6ca5b
|
@ -707,7 +707,7 @@ _X_EXPORT int
|
|||
GetProximityEvents(xEvent *events, DeviceIntPtr pDev, int type,
|
||||
int first_valuator, int num_valuators, int *valuators)
|
||||
{
|
||||
int num_events = 0;
|
||||
int num_events = 1;
|
||||
deviceKeyButtonPointer *kbp = (deviceKeyButtonPointer *) events;
|
||||
|
||||
/* Sanity checks. */
|
||||
|
|
|
@ -128,7 +128,9 @@ mieqEnqueue(DeviceIntPtr pDev, xEvent *e)
|
|||
if (oldtail == miEventQueue.head ||
|
||||
!(lastkbp->type == DeviceMotionNotify ||
|
||||
lastkbp->type == DeviceButtonPress ||
|
||||
lastkbp->type == DeviceButtonRelease) ||
|
||||
lastkbp->type == DeviceButtonRelease ||
|
||||
lastkbp->type == ProximityIn ||
|
||||
lastkbp->type == ProximityOut) ||
|
||||
((lastkbp->deviceid & DEVICE_BITS) !=
|
||||
(v->deviceid & DEVICE_BITS))) {
|
||||
ErrorF("mieqEnequeue: out-of-order valuator event; dropping.\n");
|
||||
|
|
Loading…
Reference in New Issue
Block a user