From 4edcd79372a46b49374f88db236b23872ea9363a Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Thu, 5 Nov 2015 13:16:58 +1000 Subject: [PATCH] tablet: widen the serial type to uint64_t 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 Reviewed-by: Jason Gerecke --- 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 a51e76a9..65dd0d93 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 45a64377..3b797a43 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 3e315beb..29c0e56a 100644 --- a/tools/event-debug.c +++ b/tools/event-debug.c @@ -23,6 +23,7 @@ #define _GNU_SOURCE #include +#include #include #include #include @@ -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:");