diff options
author | 2023-06-15 18:44:40 +0200 | |
---|---|---|
committer | 2023-06-19 19:48:53 +0200 | |
commit | 5411ed4ef0fa84f0622149bbe2305910be9f0b67 (patch) | |
tree | 3dcd7b1c531abfeb5105ca77969cb5ec26ddc71b | |
parent | Use wlr_cursor_set_xcursor() (diff) | |
download | sway-5411ed4ef0fa84f0622149bbe2305910be9f0b67.tar.gz sway-5411ed4ef0fa84f0622149bbe2305910be9f0b67.tar.zst sway-5411ed4ef0fa84f0622149bbe2305910be9f0b67.zip |
Use wlr_cursor_unset_image()
A bit cleaner.
References: https://gitlab.freedesktop.org/wlroots/wlroots/-/merge_requests/4209
-rw-r--r-- | sway/input/cursor.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sway/input/cursor.c b/sway/input/cursor.c index 684bb1d3..abc6c554 100644 --- a/sway/input/cursor.c +++ b/sway/input/cursor.c | |||
@@ -252,7 +252,7 @@ void cursor_update_image(struct sway_cursor *cursor, | |||
252 | } | 252 | } |
253 | 253 | ||
254 | static void cursor_hide(struct sway_cursor *cursor) { | 254 | static void cursor_hide(struct sway_cursor *cursor) { |
255 | wlr_cursor_set_image(cursor->cursor, NULL, 0, 0, 0, 0, 0, 0); | 255 | wlr_cursor_unset_image(cursor->cursor); |
256 | cursor->hidden = true; | 256 | cursor->hidden = true; |
257 | wlr_seat_pointer_notify_clear_focus(cursor->seat->wlr_seat); | 257 | wlr_seat_pointer_notify_clear_focus(cursor->seat->wlr_seat); |
258 | } | 258 | } |
@@ -1068,7 +1068,7 @@ void cursor_set_image(struct sway_cursor *cursor, const char *image, | |||
1068 | } | 1068 | } |
1069 | 1069 | ||
1070 | if (!image) { | 1070 | if (!image) { |
1071 | wlr_cursor_set_image(cursor->cursor, NULL, 0, 0, 0, 0, 0, 0); | 1071 | wlr_cursor_unset_image(cursor->cursor); |
1072 | } else if (!current_image || strcmp(current_image, image) != 0) { | 1072 | } else if (!current_image || strcmp(current_image, image) != 0) { |
1073 | wlr_cursor_set_xcursor(cursor->cursor, cursor->xcursor_manager, image); | 1073 | wlr_cursor_set_xcursor(cursor->cursor, cursor->xcursor_manager, image); |
1074 | } | 1074 | } |