summaryrefslogtreecommitdiff
path: root/dix/events.c
diff options
context:
space:
mode:
Diffstat (limited to 'dix/events.c')
-rw-r--r--dix/events.c15
1 files changed, 7 insertions, 8 deletions
diff --git a/dix/events.c b/dix/events.c
index 85c8f9abc..c085a75f3 100644
--- a/dix/events.c
+++ b/dix/events.c
@@ -1131,11 +1131,10 @@ EnqueueEvent(InternalEvent *ev, DeviceIntPtr device)
event->type == ET_KeyRelease)
AccessXCancelRepeatKey(device->key->xkbInfo, event->detail.key);
-#if 0
- /* FIXME: I'm broken now. Please fix me. */
if (DeviceEventCallback)
{
DeviceEventInfoRec eventinfo;
+
/* The RECORD spec says that the root window field of motion events
* must be valid. At this point, it hasn't been filled in yet, so
* we do it here. The long expression below is necessary to get
@@ -1145,14 +1144,14 @@ EnqueueEvent(InternalEvent *ev, DeviceIntPtr device)
* the data that GetCurrentRootWindow relies on hasn't been
* updated yet.
*/
- if (xE->u.u.type == DeviceMotionNotify)
- XE_KBPTR.root =
- WindowTable[pSprite->hotPhys.pScreen->myNum]->drawable.id;
- eventinfo.events = xE;
- eventinfo.count = nevents;
+ if (ev->any.type == ET_Motion)
+ ev->device_event.root = WindowTable[pSprite->hotPhys.pScreen->myNum]->drawable.id;
+
+ eventinfo.event = ev;
+ eventinfo.device = device;
CallCallbacks(&DeviceEventCallback, (pointer)&eventinfo);
}
-#endif
+
if (event->type == ET_Motion)
{
#ifdef PANORAMIX