mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2025-11-02 09:01:38 -05:00
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.
This commit is contained in:
parent
86b8729998
commit
6d8e1abfc0
5 changed files with 20 additions and 6 deletions
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue