aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/dix/events.c
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2010-01-07 14:53:48 +0000
committermarha <marha@users.sourceforge.net>2010-01-07 14:53:48 +0000
commitd5ac51b006c039894e4e35102a8e182d21a52efc (patch)
treec01c6a3e0155d887b99d15962c4e3cfeee3746ad /xorg-server/dix/events.c
parente76fe637326278601890dd11749ea2c40a26f550 (diff)
parent20f59c125afe31a8bdb0ae6a74dd408e5fa00237 (diff)
downloadvcxsrv-d5ac51b006c039894e4e35102a8e182d21a52efc.tar.gz
vcxsrv-d5ac51b006c039894e4e35102a8e182d21a52efc.tar.bz2
vcxsrv-d5ac51b006c039894e4e35102a8e182d21a52efc.zip
svn merge ^/branches/released
(Merged in record 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 1a78c5499..781cc98e4 100644
--- a/xorg-server/dix/events.c
+++ b/xorg-server/dix/events.c
@@ -1134,11 +1134,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
@@ -1148,14 +1149,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