2 steps forward 1 step back? What a great three-step waltz!
Reported-by: David Foley <[email protected]>
Tested-by: David Foley <[email protected]>
Signed-off-by: Ping Cheng <[email protected]>
---
src/wcmValidateDevice.c | 21 ++++++++++++---------
1 files changed, 12 insertions(+), 9 deletions(-)
diff --git a/src/wcmValidateDevice.c b/src/wcmValidateDevice.c
index 327b8ea..cde194d 100644
--- a/src/wcmValidateDevice.c
+++ b/src/wcmValidateDevice.c
@@ -144,17 +144,20 @@ Bool wcmIsAValidType(InputInfoPtr pInfo, const char* type)
/* walkthrough all types */
for (j = 0; j < ARRAY_SIZE(wcmType); j++)
{
- for (k = 0; wcmType[j].type[k] && !ret; k++)
+ if (!strcmp(wcmType[j].type, type))
{
- if (ISBITSET (common->wcmKeys, wcmType[j].tool[k]))
+ for (k = 0; wcmType[j].tool[k] && !ret; k++)
{
- ret = TRUE;
- }
- else if (!strlen(dsource)) /* an user defined type */
- {
- /* assume it is a valid type */
- SETBIT(common->wcmKeys, wcmType[j].tool[k]);
- ret = TRUE;
+ if (ISBITSET (common->wcmKeys,
wcmType[j].tool[k]))
+ {
+ ret = TRUE;
+ }
+ else if (!strlen(dsource)) /* an user defined
type */
+ {
+ /* assume it is a valid type */
+ SETBIT(common->wcmKeys,
wcmType[j].tool[k]);
+ ret = TRUE;
+ }
}
}
}
--
1.7.2.3
------------------------------------------------------------------------------
Beautiful is writing same markup. Internet Explorer 9 supports
standards for HTML5, CSS3, SVG 1.1, ECMAScript5, and DOM L2 & L3.
Spend less time writing and rewriting code and more time creating great
experiences on the web. Be a part of the beta today
http://p.sf.net/sfu/msIE9-sfdev2dev
_______________________________________________
Linuxwacom-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/linuxwacom-devel