aboutsummaryrefslogtreecommitdiffstats
path: root/sway/input/cursor.c
diff options
context:
space:
mode:
authorLibravatar Ryan Dwyer <ryandwyer1@gmail.com>2018-10-23 21:38:30 +1000
committerLibravatar Ryan Dwyer <ryandwyer1@gmail.com>2018-10-23 21:38:30 +1000
commit450a0661d71c5be08416cb6684961f7da0301344 (patch)
treeb64d1f4322c1ff527d94462c261cd024d7d1f453 /sway/input/cursor.c
parentMerge pull request #2941 from ianyfan/commands (diff)
downloadsway-450a0661d71c5be08416cb6684961f7da0301344.tar.gz
sway-450a0661d71c5be08416cb6684961f7da0301344.tar.zst
sway-450a0661d71c5be08416cb6684961f7da0301344.zip
Fix dormant cursor when using multiple seats
The cursor's image would be removed or set when the seat's capabilities were updated, but there was nothing to prevent the image from being set at other times.
Diffstat (limited to 'sway/input/cursor.c')
-rw-r--r--sway/input/cursor.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/sway/input/cursor.c b/sway/input/cursor.c
index a07bc53b..60d4bf5d 100644
--- a/sway/input/cursor.c
+++ b/sway/input/cursor.c
@@ -1220,6 +1220,9 @@ static void handle_request_set_cursor(struct wl_listener *listener,
1220 1220
1221void cursor_set_image(struct sway_cursor *cursor, const char *image, 1221void cursor_set_image(struct sway_cursor *cursor, const char *image,
1222 struct wl_client *client) { 1222 struct wl_client *client) {
1223 if (!(cursor->seat->wlr_seat->capabilities & WL_SEAT_CAPABILITY_POINTER)) {
1224 return;
1225 }
1223 if (!image) { 1226 if (!image) {
1224 wlr_cursor_set_image(cursor->cursor, NULL, 0, 0, 0, 0, 0, 0); 1227 wlr_cursor_set_image(cursor->cursor, NULL, 0, 0, 0, 0, 0, 0);
1225 } else if (!cursor->image || strcmp(cursor->image, image) != 0) { 1228 } else if (!cursor->image || strcmp(cursor->image, image) != 0) {