aboutsummaryrefslogtreecommitdiff
path: root/backend/libinput/tablet_pad.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/tablet_pad.c
parenta224e74fadd6393e25ec7392115892aec87dc11a (diff)
remove time usec
Diffstat (limited to 'backend/libinput/tablet_pad.c')
-rw-r--r--backend/libinput/tablet_pad.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/backend/libinput/tablet_pad.c b/backend/libinput/tablet_pad.c
index 62d9d2ec..7dac3b7c 100644
--- a/backend/libinput/tablet_pad.c
+++ b/backend/libinput/tablet_pad.c
@@ -30,8 +30,8 @@ void handle_tablet_pad_button(struct libinput_event *event,
struct libinput_event_tablet_pad *pevent =
libinput_event_get_tablet_pad_event(event);
struct wlr_event_tablet_pad_button wlr_event = { 0 };
- wlr_event.time_usec = libinput_event_tablet_pad_get_time_usec(pevent);
- wlr_event.time_msec = (uint32_t)(wlr_event.time_usec / 1000);
+ wlr_event.time_msec =
+ usec_to_msec(libinput_event_tablet_pad_get_time_usec(pevent));
wlr_event.button = libinput_event_tablet_pad_get_button_number(pevent);
switch (libinput_event_tablet_pad_get_button_state(pevent)) {
case LIBINPUT_BUTTON_STATE_PRESSED:
@@ -55,8 +55,8 @@ void handle_tablet_pad_ring(struct libinput_event *event,
struct libinput_event_tablet_pad *pevent =
libinput_event_get_tablet_pad_event(event);
struct wlr_event_tablet_pad_ring wlr_event = { 0 };
- wlr_event.time_usec = libinput_event_tablet_pad_get_time_usec(pevent);
- wlr_event.time_msec = (uint32_t)(wlr_event.time_usec / 1000);
+ wlr_event.time_msec =
+ usec_to_msec(libinput_event_tablet_pad_get_time_usec(pevent));
wlr_event.ring = libinput_event_tablet_pad_get_ring_number(pevent);
wlr_event.position = libinput_event_tablet_pad_get_ring_position(pevent);
switch (libinput_event_tablet_pad_get_ring_source(pevent)) {
@@ -81,8 +81,8 @@ void handle_tablet_pad_strip(struct libinput_event *event,
struct libinput_event_tablet_pad *pevent =
libinput_event_get_tablet_pad_event(event);
struct wlr_event_tablet_pad_strip wlr_event = { 0 };
- wlr_event.time_usec = libinput_event_tablet_pad_get_time_usec(pevent);
- wlr_event.time_msec = (uint32_t)(wlr_event.time_usec / 1000);
+ wlr_event.time_msec =
+ usec_to_msec(libinput_event_tablet_pad_get_time_usec(pevent));
wlr_event.strip = libinput_event_tablet_pad_get_strip_number(pevent);
wlr_event.position = libinput_event_tablet_pad_get_strip_position(pevent);
switch (libinput_event_tablet_pad_get_strip_source(pevent)) {