aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/Xi/exevents.c
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2010-01-07 14:43:29 +0000
committermarha <marha@users.sourceforge.net>2010-01-07 14:43:29 +0000
commit20f59c125afe31a8bdb0ae6a74dd408e5fa00237 (patch)
tree93fc4a87d462f722360911761986b031add1f5ae /xorg-server/Xi/exevents.c
parent163827567b71b0763a4c1a7104159cd08b5c2d95 (diff)
downloadvcxsrv-20f59c125afe31a8bdb0ae6a74dd408e5fa00237.tar.gz
vcxsrv-20f59c125afe31a8bdb0ae6a74dd408e5fa00237.tar.bz2
vcxsrv-20f59c125afe31a8bdb0ae6a74dd408e5fa00237.zip
Added patches for bug http://bugs.freedesktop.org/show_bug.cgi?id=20500
0001-dix-EventToCore-needs-to-copy-the-root-window-too.patch 0001-Re-enable-the-RECORD-extension.patch
Diffstat (limited to 'xorg-server/Xi/exevents.c')
-rw-r--r--xorg-server/Xi/exevents.c37
1 files changed, 30 insertions, 7 deletions
diff --git a/xorg-server/Xi/exevents.c b/xorg-server/Xi/exevents.c
index cb2452bb8..5f8e1fac5 100644
--- a/xorg-server/Xi/exevents.c
+++ b/xorg-server/Xi/exevents.c
@@ -1031,16 +1031,39 @@ ProcessOtherEvent(InternalEvent *ev, DeviceIntPtr device)
break;
}
-#if 0
- /* FIXME: I'm broken. Please fix me. Thanks */
if (DeviceEventCallback) {
- DeviceEventInfoRec eventinfo;
+ DeviceEventInfoRec eventinfo;
+ SpritePtr pSprite = device->spriteInfo->sprite;
+ xEvent *xi_events = NULL;
+ int count;
+
+ /* see comment in EnqueueEvents regarding the next three lines */
+ if (ev->any.type == ET_Motion)
+ ev->device_event.root =
+ WindowTable[pSprite->hotPhys.pScreen->myNum]->drawable.id;
+
+ /* SDs send XI events only. MDs send both an XI event and a core
+ * event.
+ */
+ EventToXI(ev, &xi_events, &count);
+
+ eventinfo.events = (xEventPtr)xi_events;
+ eventinfo.count = count;
+ ErrorF("POE xi root is %lx\n", xi_events->u.keyButtonPointer.root);
+ CallCallbacks(&DeviceEventCallback, (pointer) & eventinfo);
+ xfree(xi_events);
+
+ if (IsMaster(device))
+ {
+ xEvent core;
+ EventToCore(ev, &core);
+ eventinfo.events = (xEventPtr)&core;
+ eventinfo.count = 1;
+ ErrorF("POE core root is %lx\n", core.u.keyButtonPointer.root);
+ CallCallbacks(&DeviceEventCallback, (pointer) & eventinfo);
+ }
- eventinfo.events = (xEventPtr) xE;
- eventinfo.count = count;
- CallCallbacks(&DeviceEventCallback, (pointer) & eventinfo);
}
-#endif
grab = device->deviceGrab.grab;
switch(event->type)