From 7ab5e9b97c300bba793a23fa13506b0c77c50ddf Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Wed, 6 May 2009 12:07:07 +1000 Subject: [PATCH] xfree86: fix xf86PostMotionEventP type checking We only put internal events into the queue now, so let's check for ET_Motion rather than the MotionNotify. Signed-off-by: Peter Hutterer --- hw/xfree86/common/xf86Xinput.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/hw/xfree86/common/xf86Xinput.c b/hw/xfree86/common/xf86Xinput.c index a035fca7f..8a718618f 100644 --- a/hw/xfree86/common/xf86Xinput.c +++ b/hw/xfree86/common/xf86Xinput.c @@ -743,7 +743,7 @@ xf86PostMotionEventP(DeviceIntPtr device, int i = 0, nevents = 0; int dx = 0, dy = 0; Bool drag = xf86SendDragEvents(device); - xEvent *xE = NULL; + DeviceEvent *event; int index; int flags = 0; @@ -789,10 +789,11 @@ xf86PostMotionEventP(DeviceIntPtr device, valuators); for (i = 0; i < nevents; i++) { - xE = (xf86Events + i)->event; + event = (DeviceEvent*)((xf86Events + i)->event); /* Don't post core motion events for devices not registered to send * drag events. */ - if (xE->u.u.type != MotionNotify || drag) { + if (event->header == ET_Internal && + (event->type != ET_Motion || drag)) { mieqEnqueue(device, (InternalEvent*)((xf86Events + i)->event)); } }