summaryrefslogtreecommitdiff
path: root/sway/input/cursor.c
diff options
context:
space:
mode:
Diffstat (limited to 'sway/input/cursor.c')
-rw-r--r--sway/input/cursor.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/sway/input/cursor.c b/sway/input/cursor.c
index 61d75b8a..e47410a5 100644
--- a/sway/input/cursor.c
+++ b/sway/input/cursor.c
@@ -567,14 +567,14 @@ static void handle_tablet_tool_position(struct sway_cursor *cursor,
ic->mapped_from_region, &x, &y);
}
- switch (tool->tablet_v2_tool->wlr_tool->type) {
- case WLR_TABLET_TOOL_TYPE_LENS:
- case WLR_TABLET_TOOL_TYPE_MOUSE:
- wlr_cursor_move(cursor->cursor, input_device->wlr_device, dx, dy);
- break;
- default:
+ switch (tool->mode) {
+ case SWAY_TABLET_TOOL_MODE_ABSOLUTE:
wlr_cursor_warp_absolute(cursor->cursor, input_device->wlr_device,
change_x ? x : NAN, change_y ? y : NAN);
+ break;
+ case SWAY_TABLET_TOOL_MODE_RELATIVE:
+ wlr_cursor_move(cursor->cursor, input_device->wlr_device, dx, dy);
+ break;
}
double sx, sy;