[PATCH] Xext: don't try to initialize XTEST device properties if they failed.
Peter Hutterer
peter.hutterer at who-t.net
Tue Sep 8 23:06:51 PDT 2009
Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>
---
Xext/xtest.c | 22 +++++++++++-----------
1 files changed, 11 insertions(+), 11 deletions(-)
diff --git a/Xext/xtest.c b/Xext/xtest.c
index 0400062..6b0e9fd 100644
--- a/Xext/xtest.c
+++ b/Xext/xtest.c
@@ -642,21 +642,21 @@ int AllocXTestDevice (ClientPtr client, char* name,
if ( retval == Success ){
dixSetPrivate(&((*ptr)->devPrivates), XTestDevicePrivateKey, (void *)master_ptr->id);
dixSetPrivate(&((*keybd)->devPrivates), XTestDevicePrivateKey, (void *)master_keybd->id);
+
+ XIChangeDeviceProperty(*ptr, XIGetKnownProperty(XI_PROP_XTEST_DEVICE),
+ XA_INTEGER, 8, PropModeReplace, 1, &dummy,
+ FALSE);
+ XISetDevicePropertyDeletable(*ptr, XIGetKnownProperty(XI_PROP_XTEST_DEVICE), FALSE);
+ XIRegisterPropertyHandler(*ptr, DeviceSetXTestProperty, NULL, NULL);
+ XIChangeDeviceProperty(*keybd, XIGetKnownProperty(XI_PROP_XTEST_DEVICE),
+ XA_INTEGER, 8, PropModeReplace, 1, &dummy,
+ FALSE);
+ XISetDevicePropertyDeletable(*keybd, XIGetKnownProperty(XI_PROP_XTEST_DEVICE), FALSE);
+ XIRegisterPropertyHandler(*keybd, DeviceSetXTestProperty, NULL, NULL);
}
xfree( xtestname );
- XIChangeDeviceProperty(*ptr, XIGetKnownProperty(XI_PROP_XTEST_DEVICE),
- XA_INTEGER, 8, PropModeReplace, 1, &dummy,
- FALSE);
- XISetDevicePropertyDeletable(*ptr, XIGetKnownProperty(XI_PROP_XTEST_DEVICE), FALSE);
- XIRegisterPropertyHandler(*ptr, DeviceSetXTestProperty, NULL, NULL);
- XIChangeDeviceProperty(*keybd, XIGetKnownProperty(XI_PROP_XTEST_DEVICE),
- XA_INTEGER, 8, PropModeReplace, 1, &dummy,
- FALSE);
- XISetDevicePropertyDeletable(*keybd, XIGetKnownProperty(XI_PROP_XTEST_DEVICE), FALSE);
- XIRegisterPropertyHandler(*keybd, DeviceSetXTestProperty, NULL, NULL);
-
return retval;
}
--
1.6.3.rc1.2.g0164.dirty
More information about the xorg-devel
mailing list