[PATCH libinput 1/8] tablet: drop the tool type 'finger' from the tablet interface

Peter Hutterer peter.hutterer at who-t.net
Tue Dec 1 17:46:25 PST 2015


If it's a finger, it's a touchscreen or a touchpad, not a tablet.

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

diff --git a/src/evdev-tablet.c b/src/evdev-tablet.c
index 51f69e0..82029a9 100644
--- a/src/evdev-tablet.c
+++ b/src/evdev-tablet.c
@@ -476,7 +476,6 @@ tablet_evcode_to_tool(int code)
 	case BTN_TOOL_BRUSH:	type = LIBINPUT_TABLET_TOOL_TYPE_BRUSH;	break;
 	case BTN_TOOL_PENCIL:	type = LIBINPUT_TABLET_TOOL_TYPE_PENCIL;	break;
 	case BTN_TOOL_AIRBRUSH:	type = LIBINPUT_TABLET_TOOL_TYPE_AIRBRUSH;	break;
-	case BTN_TOOL_FINGER:	type = LIBINPUT_TABLET_TOOL_TYPE_FINGER;	break;
 	case BTN_TOOL_MOUSE:	type = LIBINPUT_TABLET_TOOL_TYPE_MOUSE;	break;
 	case BTN_TOOL_LENS:	type = LIBINPUT_TABLET_TOOL_TYPE_LENS;		break;
 	default:
@@ -493,12 +492,15 @@ tablet_process_key(struct tablet_dispatch *tablet,
 		   uint64_t time)
 {
 	switch (e->code) {
+	case BTN_TOOL_FINGER:
+		log_bug_libinput(device->base.seat->libinput,
+				 "Invalid tool 'finger' on tablet interface\n");
+		break;
 	case BTN_TOOL_PEN:
 	case BTN_TOOL_RUBBER:
 	case BTN_TOOL_BRUSH:
 	case BTN_TOOL_PENCIL:
 	case BTN_TOOL_AIRBRUSH:
-	case BTN_TOOL_FINGER:
 	case BTN_TOOL_MOUSE:
 	case BTN_TOOL_LENS:
 		tablet_update_tool(tablet,
diff --git a/src/evdev-tablet.h b/src/evdev-tablet.h
index 847b4bb..162b536 100644
--- a/src/evdev-tablet.h
+++ b/src/evdev-tablet.h
@@ -170,7 +170,6 @@ tablet_tool_to_evcode(enum libinput_tablet_tool_type type)
 	case LIBINPUT_TABLET_TOOL_TYPE_BRUSH:	  code = BTN_TOOL_BRUSH;	break;
 	case LIBINPUT_TABLET_TOOL_TYPE_PENCIL:	  code = BTN_TOOL_PENCIL;	break;
 	case LIBINPUT_TABLET_TOOL_TYPE_AIRBRUSH:  code = BTN_TOOL_AIRBRUSH;	break;
-	case LIBINPUT_TABLET_TOOL_TYPE_FINGER:	  code = BTN_TOOL_FINGER;	break;
 	case LIBINPUT_TABLET_TOOL_TYPE_MOUSE:	  code = BTN_TOOL_MOUSE;	break;
 	case LIBINPUT_TABLET_TOOL_TYPE_LENS:	  code = BTN_TOOL_LENS;		break;
 	default:
diff --git a/src/libinput.h b/src/libinput.h
index a9eee3c..48f72a1 100644
--- a/src/libinput.h
+++ b/src/libinput.h
@@ -195,7 +195,6 @@ enum libinput_tablet_tool_type {
 	LIBINPUT_TABLET_TOOL_TYPE_PENCIL,	/**< Physical drawing tool, e.g.
 					             Wacom Inking Pen */
 	LIBINPUT_TABLET_TOOL_TYPE_AIRBRUSH,	/**< An airbrush-like tool */
-	LIBINPUT_TABLET_TOOL_TYPE_FINGER,	/**< Touch */
 	LIBINPUT_TABLET_TOOL_TYPE_MOUSE,	/**< A mouse bound to the tablet */
 	LIBINPUT_TABLET_TOOL_TYPE_LENS,		/**< A mouse tool with a lens */
 };
diff --git a/tools/event-debug.c b/tools/event-debug.c
index bb32f4b..fd4033a 100644
--- a/tools/event-debug.c
+++ b/tools/event-debug.c
@@ -478,9 +478,6 @@ print_proximity_event(struct libinput_event *ev)
 	case LIBINPUT_TABLET_TOOL_TYPE_AIRBRUSH:
 		tool_str = "airbrush";
 		break;
-	case LIBINPUT_TABLET_TOOL_TYPE_FINGER:
-		tool_str = "finger";
-		break;
 	case LIBINPUT_TABLET_TOOL_TYPE_MOUSE:
 		tool_str = "mouse";
 		break;
-- 
2.5.0



More information about the wayland-devel mailing list