aboutsummaryrefslogtreecommitdiff
path: root/rootston
diff options
context:
space:
mode:
authorTony Crisci <tony@dubstepdish.com>2017-10-05 14:25:56 -0400
committerTony Crisci <tony@dubstepdish.com>2017-10-05 14:25:56 -0400
commit9bf03e1a7195ed6e9261d9f258e7a2e9fb03cef8 (patch)
tree51a5252e73ad067a4797b5f0e6ccd1d3b2ce662d /rootston
parent17b134e1783acab00e494d5343b3611ece65e582 (diff)
bug: use milisecond granularity for time events
Diffstat (limited to 'rootston')
-rw-r--r--rootston/cursor.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/rootston/cursor.c b/rootston/cursor.c
index a0fd36d0..531d82cc 100644
--- a/rootston/cursor.c
+++ b/rootston/cursor.c
@@ -120,7 +120,7 @@ static void handle_cursor_motion(struct wl_listener *listener, void *data) {
struct wlr_event_pointer_motion *event = data;
wlr_cursor_move(input->cursor, event->device,
event->delta_x, event->delta_y);
- cursor_update_position(input, (uint32_t)event->time_usec);
+ cursor_update_position(input, (uint32_t)(event->time_usec / 1000));
}
static void handle_cursor_motion_absolute(struct wl_listener *listener,
@@ -130,7 +130,7 @@ static void handle_cursor_motion_absolute(struct wl_listener *listener,
struct wlr_event_pointer_motion_absolute *event = data;
wlr_cursor_warp_absolute(input->cursor, event->device,
event->x_mm / event->width_mm, event->y_mm / event->height_mm);
- cursor_update_position(input, (uint32_t)event->time_usec);
+ cursor_update_position(input, (uint32_t)(event->time_usec / 1000));
}
static void handle_cursor_axis(struct wl_listener *listener, void *data) {
@@ -176,7 +176,7 @@ static void handle_cursor_button(struct wl_listener *listener, void *data) {
struct roots_input *input = wl_container_of(listener, input, cursor_button);
struct wlr_event_pointer_button *event = data;
do_cursor_button_press(input, input->cursor, event->device,
- (uint32_t)event->time_usec, event->button, event->state);
+ (uint32_t)(event->time_usec / 1000), event->button, event->state);
}
static void handle_tool_axis(struct wl_listener *listener, void *data) {
@@ -186,7 +186,7 @@ static void handle_tool_axis(struct wl_listener *listener, void *data) {
(event->updated_axes & WLR_TABLET_TOOL_AXIS_Y)) {
wlr_cursor_warp_absolute(input->cursor, event->device,
event->x_mm / event->width_mm, event->y_mm / event->height_mm);
- cursor_update_position(input, (uint32_t)event->time_usec);
+ cursor_update_position(input, (uint32_t)(event->time_usec / 1000));
}
}
@@ -194,7 +194,7 @@ static void handle_tool_tip(struct wl_listener *listener, void *data) {
struct roots_input *input = wl_container_of(listener, input, cursor_tool_tip);
struct wlr_event_tablet_tool_tip *event = data;
do_cursor_button_press(input, input->cursor, event->device,
- (uint32_t)event->time_usec, BTN_LEFT, event->state);
+ (uint32_t)(event->time_usec / 1000), BTN_LEFT, event->state);
}
void cursor_initialize(struct roots_input *input) {