diff options
author | Drew DeVault <sir@cmpwn.com> | 2017-11-04 01:35:12 -0400 |
---|---|---|
committer | Drew DeVault <sir@cmpwn.com> | 2017-11-04 01:35:12 -0400 |
commit | 6d8e1abfc0a266e8ff1a8c9ba1a004faeaac79d5 (patch) | |
tree | f13d5269e8728fc66a1a8dd7b50fb355d83de7a2 /rootston | |
parent | 86b87299986a430a52b4eac3f2e0e7b659176c90 (diff) |
Improve input sensitivity
We now use doubles until the last minute, which makes it so we can move
the pointer more precisely. This also includes a fix for tablet tools,
which move absolutely and sometimes do not update the X or Y axis.
Diffstat (limited to 'rootston')
-rw-r--r-- | rootston/cursor.c | 9 |
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); } } |