[PATCH libinput v2 1/9] core: Make time argument to internal foo_notify_bar functions 64 bit

Hans de Goede hdegoede at redhat.com
Sun Sep 28 04:21:00 PDT 2014


The libinput evdev code uses 64 bit timestamps internally, to avoid having to
deal with timestamp wraps. The internal foo_notify_bar functions time argument
however is only 32 bits, bump this to 64 bits to avoid truncating the timestamps
when calling these functions.

This is a preparation patch for adding internal event listeners, so that the
callbacks for these can get the full 64 bit timestamps.

Signed-off-by: Hans de Goede <hdegoede at redhat.com>
---
 src/libinput-private.h | 18 +++++++++---------
 src/libinput.c         | 18 +++++++++---------
 2 files changed, 18 insertions(+), 18 deletions(-)

diff --git a/src/libinput-private.h b/src/libinput-private.h
index 5a975d9..3794520 100644
--- a/src/libinput-private.h
+++ b/src/libinput-private.h
@@ -213,37 +213,37 @@ notify_removed_device(struct libinput_device *device);
 
 void
 keyboard_notify_key(struct libinput_device *device,
-		    uint32_t time,
+		    uint64_t time,
 		    uint32_t key,
 		    enum libinput_key_state state);
 
 void
 pointer_notify_motion(struct libinput_device *device,
-		      uint32_t time,
+		      uint64_t time,
 		      double dx,
 		      double dy);
 
 void
 pointer_notify_motion_absolute(struct libinput_device *device,
-			       uint32_t time,
+			       uint64_t time,
 			       double x,
 			       double y);
 
 void
 pointer_notify_button(struct libinput_device *device,
-		      uint32_t time,
+		      uint64_t time,
 		      int32_t button,
 		      enum libinput_button_state state);
 
 void
 pointer_notify_axis(struct libinput_device *device,
-		    uint32_t time,
+		    uint64_t time,
 		    enum libinput_pointer_axis axis,
 		    double value);
 
 void
 touch_notify_touch_down(struct libinput_device *device,
-			uint32_t time,
+			uint64_t time,
 			int32_t slot,
 			int32_t seat_slot,
 			double x,
@@ -251,7 +251,7 @@ touch_notify_touch_down(struct libinput_device *device,
 
 void
 touch_notify_touch_motion(struct libinput_device *device,
-			  uint32_t time,
+			  uint64_t time,
 			  int32_t slot,
 			  int32_t seat_slot,
 			  double x,
@@ -259,13 +259,13 @@ touch_notify_touch_motion(struct libinput_device *device,
 
 void
 touch_notify_touch_up(struct libinput_device *device,
-		      uint32_t time,
+		      uint64_t time,
 		      int32_t slot,
 		      int32_t seat_slot);
 
 void
 touch_notify_frame(struct libinput_device *device,
-		   uint32_t time);
+		   uint64_t time);
 
 static inline uint64_t
 libinput_now(struct libinput *libinput)
diff --git a/src/libinput.c b/src/libinput.c
index 5780a92..3630440 100644
--- a/src/libinput.c
+++ b/src/libinput.c
@@ -832,7 +832,7 @@ notify_removed_device(struct libinput_device *device)
 
 void
 keyboard_notify_key(struct libinput_device *device,
-		    uint32_t time,
+		    uint64_t time,
 		    uint32_t key,
 		    enum libinput_key_state state)
 {
@@ -859,7 +859,7 @@ keyboard_notify_key(struct libinput_device *device,
 
 void
 pointer_notify_motion(struct libinput_device *device,
-		      uint32_t time,
+		      uint64_t time,
 		      double dx,
 		      double dy)
 {
@@ -882,7 +882,7 @@ pointer_notify_motion(struct libinput_device *device,
 
 void
 pointer_notify_motion_absolute(struct libinput_device *device,
-			       uint32_t time,
+			       uint64_t time,
 			       double x,
 			       double y)
 {
@@ -905,7 +905,7 @@ pointer_notify_motion_absolute(struct libinput_device *device,
 
 void
 pointer_notify_button(struct libinput_device *device,
-		      uint32_t time,
+		      uint64_t time,
 		      int32_t button,
 		      enum libinput_button_state state)
 {
@@ -934,7 +934,7 @@ pointer_notify_button(struct libinput_device *device,
 
 void
 pointer_notify_axis(struct libinput_device *device,
-		    uint32_t time,
+		    uint64_t time,
 		    enum libinput_pointer_axis axis,
 		    double value)
 {
@@ -957,7 +957,7 @@ pointer_notify_axis(struct libinput_device *device,
 
 void
 touch_notify_touch_down(struct libinput_device *device,
-			uint32_t time,
+			uint64_t time,
 			int32_t slot,
 			int32_t seat_slot,
 			double x,
@@ -984,7 +984,7 @@ touch_notify_touch_down(struct libinput_device *device,
 
 void
 touch_notify_touch_motion(struct libinput_device *device,
-			  uint32_t time,
+			  uint64_t time,
 			  int32_t slot,
 			  int32_t seat_slot,
 			  double x,
@@ -1011,7 +1011,7 @@ touch_notify_touch_motion(struct libinput_device *device,
 
 void
 touch_notify_touch_up(struct libinput_device *device,
-		      uint32_t time,
+		      uint64_t time,
 		      int32_t slot,
 		      int32_t seat_slot)
 {
@@ -1034,7 +1034,7 @@ touch_notify_touch_up(struct libinput_device *device,
 
 void
 touch_notify_frame(struct libinput_device *device,
-		   uint32_t time)
+		   uint64_t time)
 {
 	struct libinput_event_touch *touch_event;
 
-- 
2.1.0



More information about the wayland-devel mailing list