diff options
author | Peter Hutterer <peter.hutterer@who-t.net> | 2009-06-23 10:50:52 +1000 |
---|---|---|
committer | Peter Hutterer <peter.hutterer@who-t.net> | 2009-07-01 08:46:31 +1000 |
commit | 0814f511d56a89c7b1868b17eba7a89f990b9ab1 (patch) | |
tree | 606dcc0cfe2e2cbed05f03f71400d6b872b83298 /Xext | |
parent | 1bcc0d3c244ce7d9f5cbab626aa5fd5784b41a1c (diff) |
input: store the master device's ID in the devPrivate for XTest devices.
Rather than storing a simple boolean in the devPrivate for XTest devices,
store the actual master device's id (since it is constant for the life of
the device anyway).
Callers should use GetXtstDevice now instead of digging around in the
devPrivates themselves.
This patch allows for a cleanup in the creation of new master devices since
GetMaster and GetXtstDevice spare the need for loops, IsPointer checks and
similar.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Acked-by: Benjamin Close <Benjamin.Close@clearchain.com>
Diffstat (limited to 'Xext')
-rw-r--r-- | Xext/xtest.c | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/Xext/xtest.c b/Xext/xtest.c index 32abe2a81..4f5c5275c 100644 --- a/Xext/xtest.c +++ b/Xext/xtest.c @@ -56,7 +56,6 @@ extern int DeviceValuator; extern int DeviceMotionNotify; -extern DevPrivateKey XTstDevicePrivateKey; #ifdef PANORAMIX #include "panoramiX.h" @@ -299,14 +298,7 @@ ProcXTestFakeInput(ClientPtr client) return BadValue; } - /* When faking core events through XTest, we always fake through the - * virtual test device. - */ - for(it = inputInfo.devices; it ; it = it->next ) - if( !IsMaster(it) && it->u.master == dev && - dixLookupPrivate(&it->devPrivates, XTstDevicePrivateKey )) - break; - dev= it; + dev = GetXtstDevice(dev); } /* If the event has a time set, wait for it to pass */ |