aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFurkan Sahin <furkan-dev@proton.me>2018-10-23 22:00:57 +1000
committerFurkan Sahin <furkan-dev@proton.me>2018-10-23 22:00:57 +1000
commit4b0c1d62cec3477d2e7f843bfb865d48b2d66b5e (patch)
treef322fea2219b911acf78062b94b385dec8df32f6
parent266c6247b01b6ec292de6fb8ae2968f047c2bf99 (diff)
seat_update_capabilities: Set cursor image while we have the capability
-rw-r--r--sway/input/seat.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/sway/input/seat.c b/sway/input/seat.c
index 16acc8a5..89d841bb 100644
--- a/sway/input/seat.c
+++ b/sway/input/seat.c
@@ -389,12 +389,15 @@ static void seat_update_capabilities(struct sway_seat *seat) {
break;
}
}
- wlr_seat_set_capabilities(seat->wlr_seat, caps);
- // Hide cursor if seat doesn't have pointer capability
+ // Hide cursor if seat doesn't have pointer capability.
+ // We must call cursor_set_image while the wlr_seat has the capabilities
+ // otherwise it's a no op.
if ((caps & WL_SEAT_CAPABILITY_POINTER) == 0) {
cursor_set_image(seat->cursor, NULL, NULL);
+ wlr_seat_set_capabilities(seat->wlr_seat, caps);
} else {
+ wlr_seat_set_capabilities(seat->wlr_seat, caps);
cursor_set_image(seat->cursor, "left_ptr", NULL);
}
}