aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/Xext/xtest.c
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2010-06-11 12:14:52 +0000
committermarha <marha@users.sourceforge.net>2010-06-11 12:14:52 +0000
commit4c61bf84b11e26e6f22648668c95ea760a379163 (patch)
tree0ac762ab2815eae283dded7447ad7cb5a54b926a /xorg-server/Xext/xtest.c
parente1dabd2ce8be0d70c6c15353b58de256129dfd1f (diff)
downloadvcxsrv-4c61bf84b11e26e6f22648668c95ea760a379163.tar.gz
vcxsrv-4c61bf84b11e26e6f22648668c95ea760a379163.tar.bz2
vcxsrv-4c61bf84b11e26e6f22648668c95ea760a379163.zip
xserver git update 11/6/2010
Diffstat (limited to 'xorg-server/Xext/xtest.c')
-rw-r--r--xorg-server/Xext/xtest.c26
1 files changed, 7 insertions, 19 deletions
diff --git a/xorg-server/Xext/xtest.c b/xorg-server/Xext/xtest.c
index b8f5e86d8..9873f662a 100644
--- a/xorg-server/Xext/xtest.c
+++ b/xorg-server/Xext/xtest.c
@@ -62,10 +62,6 @@ extern int DeviceValuator;
* other's memory */
static EventListPtr xtest_evlist;
-/* Used to store if a device is an XTest Virtual device */
-static int XTestDevicePrivateKeyIndex;
-DevPrivateKey XTestDevicePrivateKey = &XTestDevicePrivateKeyIndex;
-
/**
* xtestpointer
* is the virtual pointer for XTest. It is the first slave
@@ -469,7 +465,7 @@ ProcXTestGrabControl(ClientPtr client)
if ((stuff->impervious != xTrue) && (stuff->impervious != xFalse))
{
client->errorValue = stuff->impervious;
- return(BadValue);
+ return BadValue;
}
if (stuff->impervious)
MakeClientGrabImpervious(client);
@@ -645,8 +641,8 @@ int AllocXTestDevice (ClientPtr client, char* name,
retval = AllocDevicePair( client, xtestname, ptr, keybd, CorePointerProc, CoreKeyboardProc, FALSE);
if ( retval == Success ){
- dixSetPrivate(&((*ptr)->devPrivates), XTestDevicePrivateKey, (void *)(intptr_t)master_ptr->id);
- dixSetPrivate(&((*keybd)->devPrivates), XTestDevicePrivateKey, (void *)(intptr_t)master_keybd->id);
+ (*ptr)->xtest_master_id = master_ptr->id;
+ (*keybd)->xtest_master_id = master_keybd->id;
XIChangeDeviceProperty(*ptr, XIGetKnownProperty(XI_PROP_XTEST_DEVICE),
XA_INTEGER, 8, PropModeReplace, 1, &dummy,
@@ -674,23 +670,15 @@ int AllocXTestDevice (ClientPtr client, char* name,
BOOL
IsXTestDevice(DeviceIntPtr dev, DeviceIntPtr master)
{
- int is_XTest = FALSE;
- int mid;
- void *tmp; /* shut up, gcc! */
-
if (IsMaster(dev))
- return is_XTest;
-
- tmp = dixLookupPrivate(&dev->devPrivates, XTestDevicePrivateKey);
- mid = (intptr_t)tmp;
+ return FALSE;
/* deviceid 0 is reserved for XIAllDevices, non-zero mid means XTest
* device */
- if ((!master && mid) ||
- (master && mid == master->id))
- is_XTest = TRUE;
+ if (master)
+ return dev->xtest_master_id == master->id;
- return is_XTest;
+ return dev->xtest_master_id != 0;
}
/**