diff options
author | Peter Hutterer <peter.hutterer@who-t.net> | 2009-01-12 16:16:24 +1000 |
---|---|---|
committer | Peter Hutterer <peter.hutterer@who-t.net> | 2009-01-13 09:22:56 +1000 |
commit | 488d45295105daf10ccd17ca93ae6a6f4d0104f1 (patch) | |
tree | 4bfc650942bf5f33b0b4afaf85d7d8a5bdf520c5 | |
parent | 1e470645983ad18fa38c0885d674bc9d1dc1e560 (diff) |
dix: EnqueueEvent and PlayReleasedEvent need to handle DeviceMotionNotifies
No MotionNotify events in the processing anymore, so let's have them treat DMN
instead.
Reported by Thomas Jaeger.
-rw-r--r-- | dix/events.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/dix/events.c b/dix/events.c index ba90ff1ea..e6a3fbff8 100644 --- a/dix/events.c +++ b/dix/events.c @@ -1154,20 +1154,20 @@ EnqueueEvent(xEvent *xE, DeviceIntPtr device, int count) * the current root window; the apparently reasonable alternative * GetCurrentRootWindow()->drawable.id doesn't give you the right * answer on the first motion event after a screen change because * the data that GetCurrentRootWindow relies on hasn't been * updated yet. */ - if (xE->u.u.type == MotionNotify) + if (xE->u.u.type == DeviceMotionNotify) XE_KBPTR.root = WindowTable[pSprite->hotPhys.pScreen->myNum]->drawable.id; eventinfo.events = xE; eventinfo.count = count; CallCallbacks(&DeviceEventCallback, (pointer)&eventinfo); } - if (xE->u.u.type == MotionNotify) + if (xE->u.u.type == DeviceMotionNotify) { #ifdef PANORAMIX if(!noPanoramiXExtension) { XE_KBPTR.rootX += panoramiXdataPtr[pSprite->screen->myNum].x - panoramiXdataPtr[0].x; XE_KBPTR.rootY += panoramiXdataPtr[pSprite->screen->myNum].y - @@ -1175,13 +1175,13 @@ EnqueueEvent(xEvent *xE, DeviceIntPtr device, int count) } #endif pSprite->hotPhys.x = XE_KBPTR.rootX; pSprite->hotPhys.y = XE_KBPTR.rootY; /* do motion compression, but not if from different devices */ if (tail && - (tail->event->u.u.type == MotionNotify) && + (tail->event->u.u.type == DeviceMotionNotify) && (tail->device == device) && (tail->pScreen == pSprite->hotPhys.pScreen)) { tail->event->u.keyButtonPointer.rootX = pSprite->hotPhys.x; tail->event->u.keyButtonPointer.rootY = pSprite->hotPhys.y; tail->event->u.keyButtonPointer.time = XE_KBPTR.time; @@ -1242,13 +1242,13 @@ PlayReleasedEvents(void) if (!qe->device->deviceGrab.sync.frozen) { *prev = qe->next; pDev = qe->device; if (*syncEvents.pendtail == *prev) syncEvents.pendtail = prev; - if (qe->event->u.u.type == MotionNotify) + if (qe->event->u.u.type == DeviceMotionNotify) CheckVirtualMotion(pDev, qe, NullWindow); syncEvents.time.months = qe->months; /* XXX: Hack! We can't reliably get the time from GenericEvents, since we don't know which struct it may be. So we store the time when we know it, and re-use it when we can't get it. */ if (qe->event->u.u.type == GenericEvent) |