aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/dix/events.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/dix/events.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/dix/events.c')
-rw-r--r--xorg-server/dix/events.c32
1 files changed, 24 insertions, 8 deletions
diff --git a/xorg-server/dix/events.c b/xorg-server/dix/events.c
index 85c8f9abc..b5c88802c 100644
--- a/xorg-server/dix/events.c
+++ b/xorg-server/dix/events.c
@@ -1131,11 +1131,12 @@ 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 *xi_events = NULL;
+ int count;
+
/* 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 +1146,29 @@ 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 =
+
+ if (ev->any.type == ET_Motion)
+ ev->device_event.root =
WindowTable[pSprite->hotPhys.pScreen->myNum]->drawable.id;
- eventinfo.events = xE;
- eventinfo.count = nevents;
- CallCallbacks(&DeviceEventCallback, (pointer)&eventinfo);
+
+ EventToXI(ev, &xi_events, &count);
+
+ eventinfo.events = (xEventPtr)xi_events;
+ eventinfo.count = count;
+ CallCallbacks(&DeviceEventCallback, (pointer) & eventinfo);
+ xfree(xi_events);
+
+ if (IsMaster(device))
+ {
+ xEvent core;
+ EventToCore(ev, &core);
+ eventinfo.events = (xEventPtr)&core;
+ eventinfo.count = 1;
+ CallCallbacks(&DeviceEventCallback, (pointer) & eventinfo);
+ }
+
}
-#endif
+
if (event->type == ET_Motion)
{
#ifdef PANORAMIX