summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPeter Hutterer <peter.hutterer@who-t.net>2011-10-26 10:51:16 +1000
committerPeter Hutterer <peter.hutterer@who-t.net>2011-11-11 15:50:36 +1000
commit6127923fe0d50cb9b9ac4ae0a3876ba6f180137c (patch)
tree16eb023d49b235645e60b3510dbc025f7abd135e /src
parentfc4f98153c2608389d87e37316036a31fb1021e7 (diff)
When resetting the queue, don't reset the touchMask
Otherwise we segfault after the first SYN event Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Diffstat (limited to 'src')
-rw-r--r--src/evdev.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/evdev.c b/src/evdev.c
index 366de37..4291343 100644
--- a/src/evdev.c
+++ b/src/evdev.c
@@ -935,6 +935,7 @@ static void EvdevPostQueuedEvents(InputInfoPtr pInfo, int num_v, int first_v,
static void
EvdevProcessSyncEvent(InputInfoPtr pInfo, struct input_event *ev)
{
+ int i;
int num_v = 0, first_v = 0;
int v[MAX_VALUATORS] = {};
EvdevPtr pEvdev = pInfo->private;
@@ -951,7 +952,15 @@ EvdevProcessSyncEvent(InputInfoPtr pInfo, struct input_event *ev)
EvdevPostProximityEvents(pInfo, FALSE, num_v, first_v, v);
memset(pEvdev->delta, 0, sizeof(pEvdev->delta));
- memset(pEvdev->queue, 0, sizeof(pEvdev->queue));
+ for (i = 0; i < ArrayLength(pEvdev->queue); i++)
+ {
+ EventQueuePtr queue = &pEvdev->queue[i];
+ queue->detail.key = 0;
+ queue->type = 0;
+ queue->val = 0;
+ /* don't reset the touchMask */
+ }
+
if (pEvdev->vals)
valuator_mask_zero(pEvdev->vals);
pEvdev->num_queue = 0;