mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2025-11-15 06:59:43 -05:00
Add libinput-1.14 support
This libinput version adds a new tablet tool type.
This commit is contained in:
parent
58b2584863
commit
94f65e354d
4 changed files with 49 additions and 9 deletions
|
|
@ -42,7 +42,7 @@ static void handle_tablet_tool_v2_set_cursor(struct wl_client *client,
|
|||
.hotspot_x = hotspot_x,
|
||||
.hotspot_y = hotspot_y,
|
||||
.seat_client = tool->seat->seat_client,
|
||||
};
|
||||
};
|
||||
|
||||
wl_signal_emit(&tool->tool->events.set_cursor, &evt);
|
||||
}
|
||||
|
|
@ -73,6 +73,9 @@ static enum zwp_tablet_tool_v2_type tablet_type_from_wlr_type(
|
|||
return ZWP_TABLET_TOOL_V2_TYPE_MOUSE;
|
||||
case WLR_TABLET_TOOL_TYPE_LENS:
|
||||
return ZWP_TABLET_TOOL_V2_TYPE_LENS;
|
||||
default:
|
||||
/* We skip these devices earlier on */
|
||||
assert(false && "Unreachable");
|
||||
}
|
||||
|
||||
assert(false && "Unreachable");
|
||||
|
|
@ -196,6 +199,21 @@ struct wlr_tablet_v2_tablet_tool *wlr_tablet_tool_create(
|
|||
struct wlr_tablet_manager_v2 *manager,
|
||||
struct wlr_seat *wlr_seat,
|
||||
struct wlr_tablet_tool *wlr_tool) {
|
||||
switch (wlr_tool->type) {
|
||||
case WLR_TABLET_TOOL_TYPE_PEN:
|
||||
case WLR_TABLET_TOOL_TYPE_ERASER:
|
||||
case WLR_TABLET_TOOL_TYPE_BRUSH:
|
||||
case WLR_TABLET_TOOL_TYPE_PENCIL:
|
||||
case WLR_TABLET_TOOL_TYPE_AIRBRUSH:
|
||||
case WLR_TABLET_TOOL_TYPE_MOUSE:
|
||||
case WLR_TABLET_TOOL_TYPE_LENS:
|
||||
/* supported */
|
||||
break;
|
||||
default:
|
||||
/* Unsupported */
|
||||
return NULL;
|
||||
}
|
||||
|
||||
struct wlr_tablet_seat_v2 *seat = get_or_create_tablet_seat(manager, wlr_seat);
|
||||
if (!seat) {
|
||||
return NULL;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue