aboutsummaryrefslogtreecommitdiff
path: root/rootston
diff options
context:
space:
mode:
Diffstat (limited to 'rootston')
-rw-r--r--rootston/cursor.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/rootston/cursor.c b/rootston/cursor.c
index 31001a9f..aa8e5122 100644
--- a/rootston/cursor.c
+++ b/rootston/cursor.c
@@ -378,11 +378,20 @@ static void handle_touch_motion(struct wl_listener *listener, void *data) {
static void handle_tool_axis(struct wl_listener *listener, void *data) {
struct roots_input *input = wl_container_of(listener, input, cursor_tool_axis);
struct wlr_event_tablet_tool_axis *event = data;
+
if ((event->updated_axes & WLR_TABLET_TOOL_AXIS_X) &&
(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, event->time_msec);
+ } else if ((event->updated_axes & WLR_TABLET_TOOL_AXIS_X)) {
+ wlr_cursor_warp_absolute(input->cursor, event->device,
+ event->x_mm / event->width_mm, -1);
+ cursor_update_position(input, event->time_msec);
+ } else if ((event->updated_axes & WLR_TABLET_TOOL_AXIS_Y)) {
+ wlr_cursor_warp_absolute(input->cursor, event->device,
+ -1, event->y_mm / event->height_mm);
+ cursor_update_position(input, event->time_msec);
}
}