diff options
author | Peter Hutterer <peter.hutterer@who-t.net> | 2009-04-24 16:15:47 +1000 |
---|---|---|
committer | Peter Hutterer <peter.hutterer@who-t.net> | 2009-04-24 16:15:47 +1000 |
commit | 057fc9a4f89282e440b5e11458f1dd8655879dd8 (patch) | |
tree | 241de5500f7b467292fb521434a1de1d064ff2bc /Xext | |
parent | 95628b797e2b326ae15406df4f736e25f5d2f12f (diff) | |
parent | 932d6bcbb68194c5bdfeb336f700dc8b31529223 (diff) |
Merge branch 'master' into xi2
Conflicts:
Xi/chdevhier.c
include/input.h
Diffstat (limited to 'Xext')
-rw-r--r-- | Xext/xtest.c | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/Xext/xtest.c b/Xext/xtest.c index ab882311a..d21eedcde 100644 --- a/Xext/xtest.c +++ b/Xext/xtest.c @@ -54,6 +54,7 @@ extern int DeviceValuator; extern int DeviceMotionNotify; +extern DevPrivateKey XTstDevicePrivateKey; #ifdef PANORAMIX #include "panoramiX.h" @@ -160,6 +161,7 @@ ProcXTestFakeInput(ClientPtr client) int i; int base = 0; int flags = 0; + DeviceIntPtr xtstdevice; nev = (stuff->length << 2) - sizeof(xReq); if ((nev % sizeof(xEvent)) || !nev) @@ -268,6 +270,8 @@ ProcXTestFakeInput(ClientPtr client) } else { + DeviceIntPtr it; + if (nev != 1) return BadLength; switch (type) @@ -294,8 +298,14 @@ ProcXTestFakeInput(ClientPtr client) return BadValue; } - if (dev->u.lastSlave) - dev = dev->u.lastSlave; + /* When faking core events through XTest, we always fake through the + * virtual test device. + */ + for(it = inputInfo.devices; it ; it = it->next ) + if( !it->isMaster && it->u.master == dev && + dixLookupPrivate(&it->devPrivates, XTstDevicePrivateKey )) + break; + dev= it; } /* If the event has a time set, wait for it to pass */ @@ -403,6 +413,7 @@ ProcXTestFakeInput(ClientPtr client) for (i = 0; i < nevents; i++) mieqProcessDeviceEvent(dev, (events+i)->event, NULL); + miPointerUpdateSprite(dev); return client->noClientException; } |