In addition to consolidating code, this happens to fix a bug in the implementation of TabletHasFeature which would return true provided *any* bit of a multi-bit mask was set. Ever since 7c667678 when WCM_TPC was changed to a multi-bit mask, tablets with WCM_LCD set have been (mis-)treated as tablet PCs. --- src/xf86WacomDefs.h | 5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/src/xf86WacomDefs.h b/src/xf86WacomDefs.h index cf16648..2b8774a 100644 --- a/src/xf86WacomDefs.h +++ b/src/xf86WacomDefs.h @@ -23,6 +23,7 @@ /***************************************************************************** * General Defines ****************************************************************************/ +#include "include/wacom-util.h" #include <asm/types.h> #include <linux/input.h> #define MAX_USB_EVENTS 32 @@ -164,8 +165,8 @@ struct _WacomModel button handling, always an LCD) */ #define WCM_PENTOUCH 0x00000400 /* Tablet supports pen and touch */ -#define TabletHasFeature(common, feature) (((common)->tablet_type & (feature)) != 0) -#define TabletSetFeature(common, feature) ((common)->tablet_type |= (feature)) +#define TabletHasFeature(common, feature) MaskIsSet((common)->tablet_type, (feature)) +#define TabletSetFeature(common, feature) MaskSet((common)->tablet_type, (feature)) #define ABSOLUTE_FLAG 0x00000100 #define BAUD_19200_FLAG 0x00000400 -- 1.7.7.1 ------------------------------------------------------------------------------ RSA(R) Conference 2012 Save $700 by Nov 18 Register now http://p.sf.net/sfu/rsa-sfdev2dev1 _______________________________________________ Linuxwacom-devel mailing list Linuxwacom-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linuxwacom-devel