aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/Xi
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2010-02-25 07:51:00 +0000
committermarha <marha@users.sourceforge.net>2010-02-25 07:51:00 +0000
commitdca37d126746d995167a31f58d3a395ae162f5d4 (patch)
tree6f5a0e00be9e5f70d6bc341d4abdb1f14c8f79a2 /xorg-server/Xi
parent23fda7c555e6c749b1d9727be5e5571a0559b9b3 (diff)
parent24bc15a386e37908396c3f6088f6fc98ceaa0f46 (diff)
downloadvcxsrv-dca37d126746d995167a31f58d3a395ae162f5d4.tar.gz
vcxsrv-dca37d126746d995167a31f58d3a395ae162f5d4.tar.bz2
vcxsrv-dca37d126746d995167a31f58d3a395ae162f5d4.zip
svn merge ^/branches/released .
Diffstat (limited to 'xorg-server/Xi')
-rw-r--r--xorg-server/Xi/exevents.c40
-rw-r--r--xorg-server/Xi/setmode.c10
2 files changed, 20 insertions, 30 deletions
diff --git a/xorg-server/Xi/exevents.c b/xorg-server/Xi/exevents.c
index 4aae7d6c5..a6e46a077 100644
--- a/xorg-server/Xi/exevents.c
+++ b/xorg-server/Xi/exevents.c
@@ -1054,38 +1054,18 @@ ProcessOtherEvent(InternalEvent *ev, DeviceIntPtr device)
}
if (DeviceEventCallback) {
- 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);
- }
+ DeviceEventInfoRec eventinfo;
+ SpritePtr pSprite = device->spriteInfo->sprite;
+ /* 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;
+
+ eventinfo.device = device;
+ eventinfo.event = ev;
+ CallCallbacks(&DeviceEventCallback, (pointer) & eventinfo);
}
+
grab = device->deviceGrab.grab;
switch(event->type)
diff --git a/xorg-server/Xi/setmode.c b/xorg-server/Xi/setmode.c
index 51e57675f..ce2ad47c7 100644
--- a/xorg-server/Xi/setmode.c
+++ b/xorg-server/Xi/setmode.c
@@ -112,7 +112,17 @@ ProcXSetDeviceMode(ClientPtr client)
if (rep.status == Success)
dev->valuator->mode = stuff->mode;
else if (rep.status != AlreadyGrabbed)
+ {
+ switch(rep.status) {
+ case BadMatch:
+ case BadImplementation:
+ case BadAlloc:
+ break;
+ default:
+ rep.status = BadMode;
+ }
return rep.status;
+ }
WriteReplyToClient(client, sizeof(xSetDeviceModeReply), &rep);
return Success;