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 /Xext/xtest.c | |
parent | fb784d99c521823339bf00b70b9824f735d88875 (diff) |
Xext: route event through master if required (XTestFakeInput)
Diffstat (limited to 'Xext/xtest.c')
-rw-r--r-- | Xext/xtest.c | 10 |
1 files changed, 9 insertions, 1 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; } |