summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Hutterer <peter.hutterer@who-t.net>2009-05-06 12:07:07 +1000
committerPeter Hutterer <peter.hutterer@who-t.net>2009-05-08 14:33:23 +1000
commit0d947aa8e87c5d92b702c60190c8bc5d32c9ba9c (patch)
tree3794ca58eeda24d4887c0c8a1f2c33d4647b2675
parent9457ce448988dacea9a3a1c14b6955767118ff31 (diff)
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 <peter.hutterer@who-t.net>
-rw-r--r--hw/xfree86/common/xf86Xinput.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/hw/xfree86/common/xf86Xinput.c b/hw/xfree86/common/xf86Xinput.c
index 3859741f6..6b34aadd6 100644
--- a/hw/xfree86/common/xf86Xinput.c
+++ b/hw/xfree86/common/xf86Xinput.c
@@ -744,7 +744,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;
@@ -790,10 +790,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));
}
}