aboutsummaryrefslogtreecommitdiff
path: root/rootston
diff options
context:
space:
mode:
Diffstat (limited to 'rootston')
-rw-r--r--rootston/cursor.c21
1 files changed, 8 insertions, 13 deletions
diff --git a/rootston/cursor.c b/rootston/cursor.c
index 52439dff..a5953e4a 100644
--- a/rootston/cursor.c
+++ b/rootston/cursor.c
@@ -288,8 +288,8 @@ void roots_cursor_handle_motion(struct roots_cursor *cursor,
void roots_cursor_handle_motion_absolute(struct roots_cursor *cursor,
struct wlr_event_pointer_motion_absolute *event) {
- wlr_cursor_warp_absolute(cursor->cursor, event->device,
- event->x_mm / event->width_mm, event->y_mm / event->height_mm);
+ wlr_cursor_warp_absolute(cursor->cursor,
+ event->device, event->x, event->y);
roots_cursor_update_position(cursor, event->time_msec);
}
@@ -310,10 +310,8 @@ void roots_cursor_handle_touch_down(struct roots_cursor *cursor,
struct roots_desktop *desktop = cursor->seat->input->server->desktop;
struct wlr_surface *surface = NULL;
double lx, ly;
- bool result =
- wlr_cursor_absolute_to_layout_coords(cursor->cursor,
- event->device, event->x_mm, event->y_mm, event->width_mm,
- event->height_mm, &lx, &ly);
+ bool result = wlr_cursor_absolute_to_layout_coords(cursor->cursor,
+ event->device, event->x, event->y, &lx, &ly);
if (!result) {
return;
}
@@ -365,8 +363,7 @@ void roots_cursor_handle_touch_motion(struct roots_cursor *cursor,
double lx, ly;
bool result =
wlr_cursor_absolute_to_layout_coords(cursor->cursor,
- event->device, event->x_mm, event->y_mm, event->width_mm,
- event->height_mm, &lx, &ly);
+ event->device, event->x, event->y, &lx, &ly);
if (!result) {
return;
}
@@ -395,15 +392,13 @@ void roots_cursor_handle_tool_axis(struct roots_cursor *cursor,
if ((event->updated_axes & WLR_TABLET_TOOL_AXIS_X) &&
(event->updated_axes & WLR_TABLET_TOOL_AXIS_Y)) {
wlr_cursor_warp_absolute(cursor->cursor, event->device,
- event->x_mm / event->width_mm, event->y_mm / event->height_mm);
+ event->x, event->y);
roots_cursor_update_position(cursor, event->time_msec);
} else if ((event->updated_axes & WLR_TABLET_TOOL_AXIS_X)) {
- wlr_cursor_warp_absolute(cursor->cursor, event->device,
- event->x_mm / event->width_mm, -1);
+ wlr_cursor_warp_absolute(cursor->cursor, event->device, event->x, -1);
roots_cursor_update_position(cursor, event->time_msec);
} else if ((event->updated_axes & WLR_TABLET_TOOL_AXIS_Y)) {
- wlr_cursor_warp_absolute(cursor->cursor, event->device,
- -1, event->y_mm / event->height_mm);
+ wlr_cursor_warp_absolute(cursor->cursor, event->device, -1, event->y);
roots_cursor_update_position(cursor, event->time_msec);
}
}