aboutsummaryrefslogtreecommitdiff
path: root/backend/libinput/touch.c
diff options
context:
space:
mode:
authorTony Crisci <tony@dubstepdish.com>2017-10-30 15:43:06 -0400
committerTony Crisci <tony@dubstepdish.com>2017-10-30 15:43:06 -0400
commit875a5b446fcf04314ee102624bda7ae18939837e (patch)
tree4030c2bce3f8fbeeed9cff560f5290d41ea3d2a7 /backend/libinput/touch.c
parenta224e74fadd6393e25ec7392115892aec87dc11a (diff)
remove time usec
Diffstat (limited to 'backend/libinput/touch.c')
-rw-r--r--backend/libinput/touch.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/backend/libinput/touch.c b/backend/libinput/touch.c
index 2fd23fe6..f133b678 100644
--- a/backend/libinput/touch.c
+++ b/backend/libinput/touch.c
@@ -31,8 +31,8 @@ void handle_touch_down(struct libinput_event *event,
libinput_event_get_touch_event(event);
struct wlr_event_touch_down wlr_event = { 0 };
wlr_event.device = wlr_dev;
- wlr_event.time_usec = libinput_event_touch_get_time_usec(tevent);
- wlr_event.time_msec = (uint32_t)(wlr_event.time_usec / 1000);
+ wlr_event.time_msec =
+ usec_to_msec(libinput_event_touch_get_time_usec(tevent));
wlr_event.slot = libinput_event_touch_get_slot(tevent);
wlr_event.x_mm = libinput_event_touch_get_x(tevent);
wlr_event.y_mm = libinput_event_touch_get_y(tevent);
@@ -52,8 +52,8 @@ void handle_touch_up(struct libinput_event *event,
libinput_event_get_touch_event(event);
struct wlr_event_touch_up wlr_event = { 0 };
wlr_event.device = wlr_dev;
- wlr_event.time_usec = libinput_event_touch_get_time_usec(tevent);
- wlr_event.time_msec = (uint32_t)(wlr_event.time_usec / 1000);
+ wlr_event.time_msec =
+ usec_to_msec(libinput_event_touch_get_time_usec(tevent));
wlr_event.slot = libinput_event_touch_get_slot(tevent);
wl_signal_emit(&wlr_dev->touch->events.up, &wlr_event);
}
@@ -70,8 +70,8 @@ void handle_touch_motion(struct libinput_event *event,
libinput_event_get_touch_event(event);
struct wlr_event_touch_motion wlr_event = { 0 };
wlr_event.device = wlr_dev;
- wlr_event.time_usec = libinput_event_touch_get_time_usec(tevent);
- wlr_event.time_msec = (uint32_t)(wlr_event.time_usec / 1000);
+ wlr_event.time_msec =
+ usec_to_msec(libinput_event_touch_get_time_usec(tevent));
wlr_event.slot = libinput_event_touch_get_slot(tevent);
wlr_event.x_mm = libinput_event_touch_get_x(tevent);
wlr_event.y_mm = libinput_event_touch_get_y(tevent);
@@ -91,8 +91,8 @@ void handle_touch_cancel(struct libinput_event *event,
libinput_event_get_touch_event(event);
struct wlr_event_touch_cancel wlr_event = { 0 };
wlr_event.device = wlr_dev;
- wlr_event.time_usec = libinput_event_touch_get_time_usec(tevent);
- wlr_event.time_msec = (uint32_t)(wlr_event.time_usec / 1000);
+ wlr_event.time_msec =
+ usec_to_msec(libinput_event_touch_get_time_usec(tevent));
wlr_event.slot = libinput_event_touch_get_slot(tevent);
wl_signal_emit(&wlr_dev->touch->events.cancel, &wlr_event);
}