summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBartosz Fabianowski <freebsd@chillt.de>2007-12-07 02:38:14 +0000
committerDaniel Stone <daniel@fooishbar.org>2007-12-07 02:38:44 +0000
commit446efcc554195970cb3ddcd992f7aac617d45b1d (patch)
tree502362510ea5f99b26aea220542299d571217a07
parent9f4689173ef9db080592497dc2212ae79b8d6e02 (diff)
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. (cherry picked from commit 2dcfab37d38c0c72e9be7cc724047405c8029e88)
-rw-r--r--dix/getevents.c2
-rw-r--r--mi/mieq.c4
2 files changed, 4 insertions, 2 deletions
diff --git a/dix/getevents.c b/dix/getevents.c
index b70653da7..12d8189f3 100644
--- a/dix/getevents.c
+++ b/dix/getevents.c
@@ -705,7 +705,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. */
diff --git a/mi/mieq.c b/mi/mieq.c
index 20c4b6201..e644090ad 100644
--- a/mi/mieq.c
+++ b/mi/mieq.c
@@ -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");