diff options
author | emersion <contact@emersion.fr> | 2018-01-16 20:37:32 +0100 |
---|---|---|
committer | emersion <contact@emersion.fr> | 2018-01-17 14:01:13 +0100 |
commit | 6e9c652fc4c3dc65d313f4cb8823995a98d65964 (patch) | |
tree | aafc9bbef61e4f559b19de58489bf1def72a2de2 /rootston | |
parent | 7f56ccd71395d2280ec463d8847b27d62c2855a6 (diff) |
rootston: hide cursor if seat has no pointer
Diffstat (limited to 'rootston')
-rw-r--r-- | rootston/seat.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/rootston/seat.c b/rootston/seat.c index c0cda3b0..a61057bd 100644 --- a/rootston/seat.c +++ b/rootston/seat.c @@ -313,6 +313,14 @@ static void seat_update_capabilities(struct roots_seat *seat) { caps |= WL_SEAT_CAPABILITY_TOUCH; } wlr_seat_set_capabilities(seat->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 { + wlr_xcursor_manager_set_cursor_image(seat->cursor->xcursor_manager, + seat->cursor->default_xcursor, seat->cursor->cursor); + } } static void seat_add_keyboard(struct roots_seat *seat, |