aboutsummaryrefslogtreecommitdiffstats
path: root/sway/input/seat.c
diff options
context:
space:
mode:
authorLibravatar Drew DeVault <sir@cmpwn.com>2018-04-08 10:48:13 -0400
committerLibravatar Drew DeVault <sir@cmpwn.com>2018-04-08 10:48:13 -0400
commit9114d3b84cf4e5ba0513a8f4d4a018a6de3d6223 (patch)
tree58353f3bf78f12345fbe47bc9680273059564644 /sway/input/seat.c
parentFixup for #1773 (diff)
downloadsway-9114d3b84cf4e5ba0513a8f4d4a018a6de3d6223.tar.gz
sway-9114d3b84cf4e5ba0513a8f4d4a018a6de3d6223.tar.zst
sway-9114d3b84cf4e5ba0513a8f4d4a018a6de3d6223.zip
Implement tablet tool support
Diffstat (limited to 'sway/input/seat.c')
-rw-r--r--sway/input/seat.c12
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,
245 } 245 }
246} 246}
247 247
248static void seat_configure_tablet_tool(struct sway_seat *seat,
249 struct sway_seat_device *sway_device) {
250 wlr_cursor_attach_input_device(seat->cursor->cursor,
251 sway_device->input_device->wlr_device);
252}
253
248static struct sway_seat_device *seat_get_device(struct sway_seat *seat, 254static struct sway_seat_device *seat_get_device(struct sway_seat *seat,
249 struct sway_input_device *input_device) { 255 struct sway_input_device *input_device) {
250 struct sway_seat_device *seat_device = NULL; 256 struct sway_seat_device *seat_device = NULL;
@@ -272,9 +278,11 @@ void seat_configure_device(struct sway_seat *seat,
272 case WLR_INPUT_DEVICE_KEYBOARD: 278 case WLR_INPUT_DEVICE_KEYBOARD:
273 seat_configure_keyboard(seat, seat_device); 279 seat_configure_keyboard(seat, seat_device);
274 break; 280 break;
275 case WLR_INPUT_DEVICE_TOUCH:
276 case WLR_INPUT_DEVICE_TABLET_PAD:
277 case WLR_INPUT_DEVICE_TABLET_TOOL: 281 case WLR_INPUT_DEVICE_TABLET_TOOL:
282 seat_configure_tablet_tool(seat, seat_device);
283 break;
284 case WLR_INPUT_DEVICE_TABLET_PAD:
285 case WLR_INPUT_DEVICE_TOUCH:
278 wlr_log(L_DEBUG, "TODO: configure other devices"); 286 wlr_log(L_DEBUG, "TODO: configure other devices");
279 break; 287 break;
280 } 288 }