aboutsummaryrefslogtreecommitdiff
path: root/backend/libinput
diff options
context:
space:
mode:
Diffstat (limited to 'backend/libinput')
-rw-r--r--backend/libinput/keyboard.c4
-rw-r--r--backend/libinput/pointer.c16
-rw-r--r--backend/libinput/tablet_pad.c12
-rw-r--r--backend/libinput/tablet_tool.c16
-rw-r--r--backend/libinput/touch.c16
5 files changed, 32 insertions, 32 deletions
diff --git a/backend/libinput/keyboard.c b/backend/libinput/keyboard.c
index 00a7ecdf..065d8ead 100644
--- a/backend/libinput/keyboard.c
+++ b/backend/libinput/keyboard.c
@@ -54,8 +54,8 @@ void handle_keyboard_key(struct libinput_event *event,
struct libinput_event_keyboard *kbevent =
libinput_event_get_keyboard_event(event);
struct wlr_event_keyboard_key wlr_event = { 0 };
- wlr_event.time_sec = libinput_event_keyboard_get_time(kbevent);
- wlr_event.time_usec = libinput_event_keyboard_get_time_usec(kbevent);
+ wlr_event.time_msec =
+ usec_to_msec(libinput_event_keyboard_get_time_usec(kbevent));
wlr_event.keycode = libinput_event_keyboard_get_key(kbevent);
enum libinput_key_state state =
libinput_event_keyboard_get_key_state(kbevent);
diff --git a/backend/libinput/pointer.c b/backend/libinput/pointer.c
index ad9b8f02..13402ac2 100644
--- a/backend/libinput/pointer.c
+++ b/backend/libinput/pointer.c
@@ -31,8 +31,8 @@ void handle_pointer_motion(struct libinput_event *event,
libinput_event_get_pointer_event(event);
struct wlr_event_pointer_motion wlr_event = { 0 };
wlr_event.device = wlr_dev;
- wlr_event.time_sec = libinput_event_pointer_get_time(pevent);
- wlr_event.time_usec = libinput_event_pointer_get_time_usec(pevent);
+ wlr_event.time_msec =
+ usec_to_msec(libinput_event_pointer_get_time_usec(pevent));
wlr_event.delta_x = libinput_event_pointer_get_dx(pevent);
wlr_event.delta_y = libinput_event_pointer_get_dy(pevent);
wl_signal_emit(&wlr_dev->pointer->events.motion, &wlr_event);
@@ -50,8 +50,8 @@ void handle_pointer_motion_abs(struct libinput_event *event,
libinput_event_get_pointer_event(event);
struct wlr_event_pointer_motion_absolute wlr_event = { 0 };
wlr_event.device = wlr_dev;
- wlr_event.time_sec = libinput_event_pointer_get_time(pevent);
- wlr_event.time_usec = libinput_event_pointer_get_time_usec(pevent);
+ wlr_event.time_msec =
+ usec_to_msec(libinput_event_pointer_get_time_usec(pevent));
wlr_event.x_mm = libinput_event_pointer_get_absolute_x(pevent);
wlr_event.y_mm = libinput_event_pointer_get_absolute_y(pevent);
libinput_device_get_size(libinput_dev, &wlr_event.width_mm, &wlr_event.height_mm);
@@ -70,8 +70,8 @@ void handle_pointer_button(struct libinput_event *event,
libinput_event_get_pointer_event(event);
struct wlr_event_pointer_button wlr_event = { 0 };
wlr_event.device = wlr_dev;
- wlr_event.time_sec = libinput_event_pointer_get_time(pevent);
- wlr_event.time_usec = libinput_event_pointer_get_time_usec(pevent);
+ wlr_event.time_msec =
+ usec_to_msec(libinput_event_pointer_get_time_usec(pevent));
wlr_event.button = libinput_event_pointer_get_button(pevent);
switch (libinput_event_pointer_get_button_state(pevent)) {
case LIBINPUT_BUTTON_STATE_PRESSED:
@@ -96,8 +96,8 @@ void handle_pointer_axis(struct libinput_event *event,
libinput_event_get_pointer_event(event);
struct wlr_event_pointer_axis wlr_event = { 0 };
wlr_event.device = wlr_dev;
- wlr_event.time_sec = libinput_event_pointer_get_time(pevent);
- wlr_event.time_usec = libinput_event_pointer_get_time_usec(pevent);
+ wlr_event.time_msec =
+ usec_to_msec(libinput_event_pointer_get_time_usec(pevent));
switch (libinput_event_pointer_get_axis_source(pevent)) {
case LIBINPUT_POINTER_AXIS_SOURCE_WHEEL:
wlr_event.source = WLR_AXIS_SOURCE_WHEEL;
diff --git a/backend/libinput/tablet_pad.c b/backend/libinput/tablet_pad.c
index efad1068..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_sec = libinput_event_tablet_pad_get_time(pevent);
- wlr_event.time_usec = libinput_event_tablet_pad_get_time_usec(pevent);
+ 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_sec = libinput_event_tablet_pad_get_time(pevent);
- wlr_event.time_usec = libinput_event_tablet_pad_get_time_usec(pevent);
+ 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_sec = libinput_event_tablet_pad_get_time(pevent);
- wlr_event.time_usec = libinput_event_tablet_pad_get_time_usec(pevent);
+ 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)) {
diff --git a/backend/libinput/tablet_tool.c b/backend/libinput/tablet_tool.c
index 472e8506..3caaf3f7 100644
--- a/backend/libinput/tablet_tool.c
+++ b/backend/libinput/tablet_tool.c
@@ -31,8 +31,8 @@ void handle_tablet_tool_axis(struct libinput_event *event,
libinput_event_get_tablet_tool_event(event);
struct wlr_event_tablet_tool_axis wlr_event = { 0 };
wlr_event.device = wlr_dev;
- wlr_event.time_sec = libinput_event_tablet_tool_get_time(tevent);
- wlr_event.time_usec = libinput_event_tablet_tool_get_time_usec(tevent);
+ wlr_event.time_msec =
+ usec_to_msec(libinput_event_tablet_tool_get_time_usec(tevent));
libinput_device_get_size(libinput_dev, &wlr_event.width_mm, &wlr_event.height_mm);
if (libinput_event_tablet_tool_x_has_changed(tevent)) {
wlr_event.updated_axes |= WLR_TABLET_TOOL_AXIS_X;
@@ -85,8 +85,8 @@ void handle_tablet_tool_proximity(struct libinput_event *event,
libinput_event_get_tablet_tool_event(event);
struct wlr_event_tablet_tool_proximity wlr_event = { 0 };
wlr_event.device = wlr_dev;
- wlr_event.time_sec = libinput_event_tablet_tool_get_time(tevent);
- wlr_event.time_usec = libinput_event_tablet_tool_get_time_usec(tevent);
+ wlr_event.time_msec =
+ usec_to_msec(libinput_event_tablet_tool_get_time_usec(tevent));
switch (libinput_event_tablet_tool_get_proximity_state(tevent)) {
case LIBINPUT_TABLET_TOOL_PROXIMITY_STATE_OUT:
wlr_event.state = WLR_TABLET_TOOL_PROXIMITY_OUT;
@@ -112,8 +112,8 @@ void handle_tablet_tool_tip(struct libinput_event *event,
libinput_event_get_tablet_tool_event(event);
struct wlr_event_tablet_tool_tip wlr_event = { 0 };
wlr_event.device = wlr_dev;
- wlr_event.time_sec = libinput_event_tablet_tool_get_time(tevent);
- wlr_event.time_usec = libinput_event_tablet_tool_get_time_usec(tevent);
+ wlr_event.time_msec =
+ usec_to_msec(libinput_event_tablet_tool_get_time_usec(tevent));
switch (libinput_event_tablet_tool_get_tip_state(tevent)) {
case LIBINPUT_TABLET_TOOL_TIP_UP:
wlr_event.state = WLR_TABLET_TOOL_TIP_UP;
@@ -138,8 +138,8 @@ void handle_tablet_tool_button(struct libinput_event *event,
libinput_event_get_tablet_tool_event(event);
struct wlr_event_tablet_tool_button wlr_event = { 0 };
wlr_event.device = wlr_dev;
- wlr_event.time_sec = libinput_event_tablet_tool_get_time(tevent);
- wlr_event.time_usec = libinput_event_tablet_tool_get_time_usec(tevent);
+ wlr_event.time_msec =
+ usec_to_msec(libinput_event_tablet_tool_get_time_usec(tevent));
wlr_event.button = libinput_event_tablet_tool_get_button(tevent);
switch (libinput_event_tablet_tool_get_button_state(tevent)) {
case LIBINPUT_BUTTON_STATE_RELEASED:
diff --git a/backend/libinput/touch.c b/backend/libinput/touch.c
index 2f300482..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_sec = libinput_event_touch_get_time(tevent);
- wlr_event.time_usec = libinput_event_touch_get_time_usec(tevent);
+ 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_sec = libinput_event_touch_get_time(tevent);
- wlr_event.time_usec = libinput_event_touch_get_time_usec(tevent);
+ 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_sec = libinput_event_touch_get_time(tevent);
- wlr_event.time_usec = libinput_event_touch_get_time_usec(tevent);
+ 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_sec = libinput_event_touch_get_time(tevent);
- wlr_event.time_usec = libinput_event_touch_get_time_usec(tevent);
+ 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);
}