[PATCH libinput 1/6] tablet: widen the serial type to uint64_t

Peter Hutterer peter.hutterer at who-t.net
Thu Nov 5 20:55:28 PST 2015


Internally we still use uint32_t because that's all we get from evdev. But
eventually we'll have 64 bit serials.

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

diff --git a/src/libinput.c b/src/libinput.c
index a51e76a..65dd0d9 100644
--- a/src/libinput.c
+++ b/src/libinput.c
@@ -1089,7 +1089,7 @@ libinput_tool_get_tool_id(struct libinput_tool *tool)
 	return tool->tool_id;
 }
 
-LIBINPUT_EXPORT uint32_t
+LIBINPUT_EXPORT uint64_t
 libinput_tool_get_serial(struct libinput_tool *tool)
 {
 	return tool->serial;
diff --git a/src/libinput.h b/src/libinput.h
index 45a6437..3b797a4 100644
--- a/src/libinput.h
+++ b/src/libinput.h
@@ -1648,7 +1648,7 @@ libinput_tool_unref(struct libinput_tool *tool);
  * @param tool The libinput tool
  * @return The new tool serial triggering this event
  */
-uint32_t
+uint64_t
 libinput_tool_get_serial(struct libinput_tool *tool);
 
 /**
diff --git a/tools/event-debug.c b/tools/event-debug.c
index 3e315be..29c0e56 100644
--- a/tools/event-debug.c
+++ b/tools/event-debug.c
@@ -23,6 +23,7 @@
 
 #define _GNU_SOURCE
 #include <errno.h>
+#include <inttypes.h>
 #include <fcntl.h>
 #include <poll.h>
 #include <stdio.h>
@@ -489,7 +490,7 @@ print_proximity_event(struct libinput_event *ev)
 		abort();
 	}
 
-	printf("\t%s (%#x) %s",
+	printf("\t%s (%#" PRIx64 ") %s",
 	       tool_str, libinput_tool_get_serial(tool), state_str);
 
 	printf("\taxes:");
-- 
2.4.3



More information about the wayland-devel mailing list