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>
This commit is contained in:
parent
9457ce4489
commit
0d947aa8e8
|
@ -744,7 +744,7 @@ xf86PostMotionEventP(DeviceIntPtr device,
|
||||||
int i = 0, nevents = 0;
|
int i = 0, nevents = 0;
|
||||||
int dx = 0, dy = 0;
|
int dx = 0, dy = 0;
|
||||||
Bool drag = xf86SendDragEvents(device);
|
Bool drag = xf86SendDragEvents(device);
|
||||||
xEvent *xE = NULL;
|
DeviceEvent *event;
|
||||||
int index;
|
int index;
|
||||||
int flags = 0;
|
int flags = 0;
|
||||||
|
|
||||||
|
@ -790,10 +790,11 @@ xf86PostMotionEventP(DeviceIntPtr device,
|
||||||
valuators);
|
valuators);
|
||||||
|
|
||||||
for (i = 0; i < nevents; i++) {
|
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
|
/* Don't post core motion events for devices not registered to send
|
||||||
* drag events. */
|
* 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));
|
mieqEnqueue(device, (InternalEvent*)((xf86Events + i)->event));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue