summaryrefslogtreecommitdiff
path: root/dix
diff options
context:
space:
mode:
Diffstat (limited to 'dix')
-rw-r--r--dix/events.c19
1 files changed, 11 insertions, 8 deletions
diff --git a/dix/events.c b/dix/events.c
index d070a4c6f..df7bd6378 100644
--- a/dix/events.c
+++ b/dix/events.c
@@ -1141,11 +1141,13 @@ 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;
+ xEvent xE;
+ /* TODO check return value of EventToCore() */
+ EventToCore(ev, &xE);
+
/* 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
@@ -1155,14 +1157,15 @@ 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 (xE.u.u.type == DeviceMotionNotify)
+ xE.u.keyButtonPointer.root = WindowTable[pSprite->hotPhys.pScreen->myNum]->drawable.id;
+
+ eventinfo.events = &xE;
+ eventinfo.count = 1;
CallCallbacks(&DeviceEventCallback, (pointer)&eventinfo);
}
-#endif
+
if (event->type == ET_Motion)
{
#ifdef PANORAMIX