aboutsummaryrefslogtreecommitdiff
path: root/sway
diff options
context:
space:
mode:
authorIan Fan <ianfan0@gmail.com>2018-09-23 14:36:12 +0100
committerIan Fan <ianfan0@gmail.com>2018-09-24 10:55:42 +0100
commitdafb0526d71ff81f6e392eeb57f76d76a6879482 (patch)
tree689a3acb76d863d37195ddd6bb9f338f50916f1a /sway
parenta032925ae7667e917f2bd8d1b77de97b400b3bf7 (diff)
seat: only show cursor if pointer configured
Diffstat (limited to 'sway')
-rw-r--r--sway/input/seat.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/sway/input/seat.c b/sway/input/seat.c
index a9c564e7..34fc1ab8 100644
--- a/sway/input/seat.c
+++ b/sway/input/seat.c
@@ -368,11 +368,20 @@ static void seat_update_capabilities(struct sway_seat *seat) {
caps |= WL_SEAT_CAPABILITY_TOUCH;
break;
case WLR_INPUT_DEVICE_TABLET_TOOL:
+ caps |= WL_SEAT_CAPABILITY_POINTER;
+ break;
case WLR_INPUT_DEVICE_TABLET_PAD:
break;
}
}
wlr_seat_set_capabilities(seat->wlr_seat, caps);
+
+ // Hide cursor if seat doesn't have pointer capability
+ if ((caps & WL_SEAT_CAPABILITY_POINTER) == 0) {
+ wlr_cursor_set_image(seat->cursor->cursor, NULL, 0, 0, 0, 0, 0, 0);
+ } else {
+ cursor_set_image(seat->cursor, "left_ptr", NULL);
+ }
}
static void seat_apply_input_config(struct sway_seat *seat,