diff options
author | Ian Fan <ianfan0@gmail.com> | 2018-09-23 14:36:12 +0100 |
---|---|---|
committer | Ian Fan <ianfan0@gmail.com> | 2018-09-24 10:55:42 +0100 |
commit | dafb0526d71ff81f6e392eeb57f76d76a6879482 (patch) | |
tree | 689a3acb76d863d37195ddd6bb9f338f50916f1a | |
parent | Merge pull request #2701 from RedSoxFan/input-wildcard (diff) | |
download | sway-dafb0526d71ff81f6e392eeb57f76d76a6879482.tar.gz sway-dafb0526d71ff81f6e392eeb57f76d76a6879482.tar.zst sway-dafb0526d71ff81f6e392eeb57f76d76a6879482.zip |
seat: only show cursor if pointer configured
-rw-r--r-- | sway/input/seat.c | 9 |
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) { | |||
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 | wlr_cursor_set_image(seat->cursor->cursor, NULL, 0, 0, 0, 0, 0, 0); | ||
382 | } else { | ||
383 | cursor_set_image(seat->cursor, "left_ptr", NULL); | ||
384 | } | ||
376 | } | 385 | } |
377 | 386 | ||
378 | static void seat_apply_input_config(struct sway_seat *seat, | 387 | static void seat_apply_input_config(struct sway_seat *seat, |