[PATCH libinput 5/8] tablet: rename STYLUS_IN_CONTACT to TOOL_IN_CONTACT

Peter Hutterer peter.hutterer at who-t.net
Wed Nov 11 13:12:59 PST 2015


Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>
---
 src/evdev-tablet.c | 6 +++---
 src/evdev-tablet.h | 2 +-
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/evdev-tablet.c b/src/evdev-tablet.c
index 04cd082..72ec31d 100644
--- a/src/evdev-tablet.c
+++ b/src/evdev-tablet.c
@@ -496,9 +496,9 @@ tablet_process_key(struct tablet_dispatch *tablet,
 		break;
 	case BTN_TOUCH:
 		if (e->value)
-			tablet_set_status(tablet, TABLET_STYLUS_IN_CONTACT);
+			tablet_set_status(tablet, TABLET_TOOL_IN_CONTACT);
 		else
-			tablet_unset_status(tablet, TABLET_STYLUS_IN_CONTACT);
+			tablet_unset_status(tablet, TABLET_TOOL_IN_CONTACT);
 
 		/* Fall through */
 	case BTN_LEFT:
@@ -843,7 +843,7 @@ sanitize_tablet_axes(struct tablet_dispatch *tablet)
 		clear_bit(tablet->changed_axes, LIBINPUT_TABLET_AXIS_DISTANCE);
 		tablet->axes[LIBINPUT_TABLET_AXIS_DISTANCE] = 0;
 	} else if (bit_is_set(tablet->changed_axes, LIBINPUT_TABLET_AXIS_PRESSURE) &&
-		   !tablet_has_status(tablet, TABLET_STYLUS_IN_CONTACT)) {
+		   !tablet_has_status(tablet, TABLET_TOOL_IN_CONTACT)) {
 		/* Make sure that the last axis value sent to the caller is a 0 */
 		if (tablet->axes[LIBINPUT_TABLET_AXIS_PRESSURE] == 0)
 			clear_bit(tablet->changed_axes,
diff --git a/src/evdev-tablet.h b/src/evdev-tablet.h
index 6b80142..64e16c7 100644
--- a/src/evdev-tablet.h
+++ b/src/evdev-tablet.h
@@ -35,7 +35,7 @@ enum tablet_status {
 	TABLET_AXES_UPDATED = 1 << 0,
 	TABLET_BUTTONS_PRESSED = 1 << 1,
 	TABLET_BUTTONS_RELEASED = 1 << 2,
-	TABLET_STYLUS_IN_CONTACT = 1 << 3,
+	TABLET_TOOL_IN_CONTACT = 1 << 3,
 	TABLET_TOOL_LEAVING_PROXIMITY = 1 << 4,
 	TABLET_TOOL_OUT_OF_PROXIMITY = 1 << 5,
 	TABLET_TOOL_ENTERING_PROXIMITY = 1 << 6
-- 
2.4.3



More information about the wayland-devel mailing list