diff options
author | Peter Hutterer <peter@cs.unisa.edu.au> | 2008-04-18 21:13:10 +0930 |
---|---|---|
committer | Peter Hutterer <peter@cs.unisa.edu.au> | 2008-04-22 17:45:55 +0930 |
commit | 179a082c26f9e562492ee2e59e7f44f949f39f9c (patch) | |
tree | f6bab47f30766f073b43708580e0865a4620e723 | |
parent | fb784d99c521823339bf00b70b9824f735d88875 (diff) |
Xext: route event through master if required (XTestFakeInput)
-rw-r--r-- | Xext/xtest.c | 10 | ||||
-rw-r--r-- | mi/mieq.c | 2 |
2 files changed, 10 insertions, 2 deletions
diff --git a/Xext/xtest.c b/Xext/xtest.c index 721dacc0c..e11f35876 100644 --- a/Xext/xtest.c +++ b/Xext/xtest.c @@ -471,7 +471,15 @@ ProcXTestFakeInput(client) if (screenIsSaved == SCREEN_SAVER_ON) dixSaveScreens(serverClient, SCREEN_SAVER_OFF, ScreenSaverReset); ev->u.keyButtonPointer.time = currentTime.milliseconds; - (*dev->public.processInputProc)(ev, dev, nev); + if (!dev->isMaster && dev->u.master) + { /* duplicate and route through master */ + xEvent *master_event = NULL; + CopyGetMasterEvent(dev->u.master, ev, &master_event, nev); + (*dev->public.processInputProc)(ev, dev, nev); + (*dev->public.processInputProc)(master_event, dev->u.master, nev); + xfree(master_event); + } else + (*dev->public.processInputProc)(ev, dev, nev); return client->noClientException; } @@ -263,7 +263,7 @@ ChangeDeviceID(DeviceIntPtr dev, xEvent* event) * @param master The event after being copied * @param count Number of events in original. */ -static void +void CopyGetMasterEvent(DeviceIntPtr mdev, xEvent* original, xEvent** master, int count) { |