diff options
author | Drew DeVault <sir@cmpwn.com> | 2017-11-10 08:21:50 -0500 |
---|---|---|
committer | Drew DeVault <sir@cmpwn.com> | 2017-11-10 08:21:50 -0500 |
commit | 425713b83730a7b707ac5b0a325b8e37464a982c (patch) | |
tree | ef504e85918a36d1abc4e9b659abf000d453a164 /rootston/cursor.c | |
parent | ca3c373c18fa2c4edb2e3f46c74d50f1f571e72c (diff) | |
parent | aafb00a15fd84b6d40f2efa52333eea5633b14e5 (diff) |
Merge branch 'hidpi'
Diffstat (limited to 'rootston/cursor.c')
-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 b153e8c8..3a6d087e 100644 --- a/rootston/cursor.c +++ b/rootston/cursor.c @@ -383,11 +383,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); } } |