mirror of
https://github.com/NickHu/sway
synced 2024-12-27 21:58:11 +01:00
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.
This commit is contained in:
parent
e33671fd9a
commit
450a0661d7
1 changed files with 3 additions and 0 deletions
|
@ -1220,6 +1220,9 @@ static void handle_request_set_cursor(struct wl_listener *listener,
|
|||
|
||||
void cursor_set_image(struct sway_cursor *cursor, const char *image,
|
||||
struct wl_client *client) {
|
||||
if (!(cursor->seat->wlr_seat->capabilities & WL_SEAT_CAPABILITY_POINTER)) {
|
||||
return;
|
||||
}
|
||||
if (!image) {
|
||||
wlr_cursor_set_image(cursor->cursor, NULL, 0, 0, 0, 0, 0, 0);
|
||||
} else if (!cursor->image || strcmp(cursor->image, image) != 0) {
|
||||
|
|
Loading…
Reference in a new issue