|
|
@ -178,9 +178,18 @@ static void handle_tool_axis(struct wl_listener *listener, void *data) {
|
|
|
|
roots_tool->tablet_v2_tool, event->distance);
|
|
|
|
roots_tool->tablet_v2_tool, event->distance);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (event->updated_axes & WLR_TABLET_TOOL_AXIS_TILT_X) {
|
|
|
|
|
|
|
|
roots_tool->tilt_x = event->tilt_x;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (event->updated_axes & WLR_TABLET_TOOL_AXIS_TILT_Y) {
|
|
|
|
|
|
|
|
roots_tool->tilt_y = event->tilt_y;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if (event->updated_axes & (WLR_TABLET_TOOL_AXIS_TILT_X | WLR_TABLET_TOOL_AXIS_TILT_Y)) {
|
|
|
|
if (event->updated_axes & (WLR_TABLET_TOOL_AXIS_TILT_X | WLR_TABLET_TOOL_AXIS_TILT_Y)) {
|
|
|
|
wlr_tablet_v2_tablet_tool_notify_tilt(
|
|
|
|
wlr_tablet_v2_tablet_tool_notify_tilt(
|
|
|
|
roots_tool->tablet_v2_tool, event->tilt_x, event->tilt_y);
|
|
|
|
roots_tool->tablet_v2_tool,
|
|
|
|
|
|
|
|
roots_tool->tilt_x, roots_tool->tilt_y);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if (event->updated_axes & WLR_TABLET_TOOL_AXIS_ROTATION) {
|
|
|
|
if (event->updated_axes & WLR_TABLET_TOOL_AXIS_ROTATION) {
|
|
|
@ -285,6 +294,12 @@ static void handle_tool_proximity(struct wl_listener *listener, void *data) {
|
|
|
|
wl_list_init(&roots_tool->tool_link);
|
|
|
|
wl_list_init(&roots_tool->tool_link);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (event->state == WLR_TABLET_TOOL_PROXIMITY_OUT) {
|
|
|
|
|
|
|
|
struct roots_tablet_tool *roots_tool = tool->data;
|
|
|
|
|
|
|
|
wlr_tablet_v2_tablet_tool_notify_proximity_out(roots_tool->tablet_v2_tool);
|
|
|
|
|
|
|
|
return;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
handle_tablet_tool_position(cursor, event->device->data, event->tool,
|
|
|
|
handle_tablet_tool_position(cursor, event->device->data, event->tool,
|
|
|
|
true, true, event->x, event->y, 0, 0);
|
|
|
|
true, true, event->x, event->y, 0, 0);
|
|
|
|
}
|
|
|
|
}
|
|
|
|