aboutsummaryrefslogtreecommitdiffstats
path: root/sway/input/seat.c
diff options
context:
space:
mode:
authorLibravatar Ryan Dwyer <ryandwyer1@gmail.com>2018-10-23 22:00:57 +1000
committerLibravatar Ryan Dwyer <ryandwyer1@gmail.com>2018-10-23 22:00:57 +1000
commit9c965ec58cb0cf29e795df7670fd512e74b538d3 (patch)
treef322fea2219b911acf78062b94b385dec8df32f6 /sway/input/seat.c
parentFix dormant cursor when using multiple seats (diff)
downloadsway-9c965ec58cb0cf29e795df7670fd512e74b538d3.tar.gz
sway-9c965ec58cb0cf29e795df7670fd512e74b538d3.tar.zst
sway-9c965ec58cb0cf29e795df7670fd512e74b538d3.zip
seat_update_capabilities: Set cursor image while we have the capability
Diffstat (limited to 'sway/input/seat.c')
-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) {
389 break; 389 break;
390 } 390 }
391 } 391 }
392 wlr_seat_set_capabilities(seat->wlr_seat, caps);
393 392
394 // Hide cursor if seat doesn't have pointer capability 393 // Hide cursor if seat doesn't have pointer capability.
394 // We must call cursor_set_image while the wlr_seat has the capabilities
395 // otherwise it's a no op.
395 if ((caps & WL_SEAT_CAPABILITY_POINTER) == 0) { 396 if ((caps & WL_SEAT_CAPABILITY_POINTER) == 0) {
396 cursor_set_image(seat->cursor, NULL, NULL); 397 cursor_set_image(seat->cursor, NULL, NULL);
398 wlr_seat_set_capabilities(seat->wlr_seat, caps);
397 } else { 399 } else {
400 wlr_seat_set_capabilities(seat->wlr_seat, caps);
398 cursor_set_image(seat->cursor, "left_ptr", NULL); 401 cursor_set_image(seat->cursor, "left_ptr", NULL);
399 } 402 }
400} 403}