diff options
author | Jason Gerecke <killertofu@gmail.com> | 2011-11-09 11:41:23 -0800 |
---|---|---|
committer | Jason Gerecke <killertofu@gmail.com> | 2011-11-14 16:09:29 -0800 |
commit | 2f233f62544f9419a6f12e201d09189339f7c1d2 (patch) | |
tree | 885467e4734e28dcf53f5e2fb8ad3efb41bb2403 | |
parent | 2c4360d7be38f242a89f2da291e075b28e0dfc51 (diff) |
Migrate Tablet(Has|Set)Feature to use the wacom-util macros
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.
Signed-off-by: Jason Gerecke <killertofu@gmail.com>
Reviewed-by: Chris Bagwell <chris@cnpbagwell.com>
-rw-r--r-- | 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 |