diff options
author | Drew DeVault <[email protected]> | 2018-04-08 11:16:56 -0400 |
---|---|---|
committer | GitHub <[email protected]> | 2018-04-08 11:16:56 -0400 |
commit | 8763957344c4d1d4095fc27a9dab18b19ab771c7 (patch) | |
tree | b2466e095d1fba54706c84a88e76e03a66ba721d /sway/input/seat.c | |
parent | e10dc77fc60be548d9c2b8782ce83db8df1f95f3 (diff) | |
parent | 9114d3b84cf4e5ba0513a8f4d4a018a6de3d6223 (diff) |
Merge pull request #1774 from swaywm/tablet-tool
Implement tablet tool support
Diffstat (limited to 'sway/input/seat.c')
-rw-r--r-- | sway/input/seat.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/sway/input/seat.c b/sway/input/seat.c index b94e3291..c34da5e5 100644 --- a/sway/input/seat.c +++ b/sway/input/seat.c @@ -245,6 +245,12 @@ static void seat_configure_keyboard(struct sway_seat *seat, } } +static void seat_configure_tablet_tool(struct sway_seat *seat, + struct sway_seat_device *sway_device) { + wlr_cursor_attach_input_device(seat->cursor->cursor, + sway_device->input_device->wlr_device); +} + static struct sway_seat_device *seat_get_device(struct sway_seat *seat, struct sway_input_device *input_device) { struct sway_seat_device *seat_device = NULL; @@ -272,9 +278,11 @@ void seat_configure_device(struct sway_seat *seat, case WLR_INPUT_DEVICE_KEYBOARD: seat_configure_keyboard(seat, seat_device); break; - case WLR_INPUT_DEVICE_TOUCH: - case WLR_INPUT_DEVICE_TABLET_PAD: case WLR_INPUT_DEVICE_TABLET_TOOL: + seat_configure_tablet_tool(seat, seat_device); + break; + case WLR_INPUT_DEVICE_TABLET_PAD: + case WLR_INPUT_DEVICE_TOUCH: wlr_log(L_DEBUG, "TODO: configure other devices"); break; } |