diff --git a/seat.c b/seat.c index 3f400db..f17c283 100644 --- a/seat.c +++ b/seat.c @@ -116,9 +116,10 @@ update_capabilities(struct cg_seat *seat) { if (!wl_list_empty(&seat->touch)) { caps |= WL_SEAT_CAPABILITY_TOUCH; } - wlr_seat_set_capabilities(seat->seat, caps); - /* Hide cursor if the seat doesn't have pointer capability. */ + /* Hide cursor if the seat doesn't have pointer capability. + * This must be called while the wlr_seat has the capability + * otherwise it's a no-op. */ if ((caps & WL_SEAT_CAPABILITY_POINTER) == 0) { wlr_cursor_set_image(seat->cursor, NULL, 0, 0, 0, 0, 0, 0); } else { @@ -126,6 +127,8 @@ update_capabilities(struct cg_seat *seat) { DEFAULT_XCURSOR, seat->cursor); } + + wlr_seat_set_capabilities(seat->seat, caps); } static void