summaryrefslogtreecommitdiffstats
path: root/sway/input/seat.c
diff options
context:
space:
mode:
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 a9c564e7..4817eae7 100644
--- a/sway/input/seat.c
+++ b/sway/input/seat.c
@@ -368,11 +368,20 @@ static void seat_update_capabilities(struct sway_seat *seat) {
368 caps |= WL_SEAT_CAPABILITY_TOUCH; 368 caps |= WL_SEAT_CAPABILITY_TOUCH;
369 break; 369 break;
370 case WLR_INPUT_DEVICE_TABLET_TOOL: 370 case WLR_INPUT_DEVICE_TABLET_TOOL:
371 caps |= WL_SEAT_CAPABILITY_POINTER;
372 break;
371 case WLR_INPUT_DEVICE_TABLET_PAD: 373 case WLR_INPUT_DEVICE_TABLET_PAD:
372 break; 374 break;
373 } 375 }
374 } 376 }
375 wlr_seat_set_capabilities(seat->wlr_seat, caps); 377 wlr_seat_set_capabilities(seat->wlr_seat, caps);
378
379 // Hide cursor if seat doesn't have pointer capability
380 if ((caps & WL_SEAT_CAPABILITY_POINTER) == 0) {
381 cursor_set_image(seat->cursor, NULL, NULL);
382 } else {
383 cursor_set_image(seat->cursor, "left_ptr", NULL);
384 }
376} 385}
377 386
378static void seat_apply_input_config(struct sway_seat *seat, 387static void seat_apply_input_config(struct sway_seat *seat,
@@ -552,8 +561,7 @@ void seat_configure_xcursor(struct sway_seat *seat) {
552 output->name, (double)output->scale); 561 output->name, (double)output->scale);
553 } 562 }
554 563
555 wlr_xcursor_manager_set_cursor_image(seat->cursor->xcursor_manager, 564 cursor_set_image(seat->cursor, "left_ptr", NULL);
556 "left_ptr", seat->cursor->cursor);
557 wlr_cursor_warp(seat->cursor->cursor, NULL, seat->cursor->cursor->x, 565 wlr_cursor_warp(seat->cursor->cursor, NULL, seat->cursor->cursor->x,
558 seat->cursor->cursor->y); 566 seat->cursor->cursor->y);
559} 567}