Since there are types that we can not decide during device initialization
stage, we allow all types defined in xorg.conf pass wcmIsAValidType check.
Signed-off-by: Ping Cheng <[email protected]>
From 98bc05c89987b2aec674ccee3ba4018d330d4572 Mon Sep 17 00:00:00 2001
From: Ping Cheng <[email protected]>
Date: Mon, 29 Mar 2010 10:44:47 -0700
Subject: [PATCH] All user defined types are valid
Since there are types that we can not decide during device initialization
stage, we allow all types defined in xorg.conf pass wcmIsAValidType check.
Signed-off-by: Ping Cheng <[email protected]>
---
src/wcmValidateDevice.c | 11 +++++++++++
1 files changed, 11 insertions(+), 0 deletions(-)
diff --git a/src/wcmValidateDevice.c b/src/wcmValidateDevice.c
index 51b16de..c7fc816 100644
--- a/src/wcmValidateDevice.c
+++ b/src/wcmValidateDevice.c
@@ -139,6 +139,7 @@ Bool wcmIsAValidType(LocalDevicePtr local, const char* type)
int j, ret = FALSE;
WacomDevicePtr priv = (WacomDevicePtr)local->private;
WacomCommonPtr common = priv->common;
+ char* dsource = xf86CheckStrOption(local->options, "_source", "");
if (!type)
return FALSE;
@@ -147,11 +148,21 @@ Bool wcmIsAValidType(LocalDevicePtr local, const char* type)
for (j = 0; j < ARRAY_SIZE(wcmType); j++)
{
if (!strcmp(wcmType[j].type, type))
+ {
if (ISBITSET (common->wcmKeys, wcmType[j].tool))
{
ret = TRUE;
break;
}
+ else if (!strlen(dsource)) /* an user defined type */
+ {
+ /* assume it is a valid type */
+ common->wcmKeys[LONG(wcmType[j].tool)]
+ |= BIT(wcmType[j].tool);
+ ret = TRUE;
+ break;
+ }
+ }
}
return ret;
}
--
1.6.6.1
------------------------------------------------------------------------------
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Linuxwacom-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/linuxwacom-devel