mirror of
https://github.com/swaywm/sway.git
synced 2025-11-26 06:59:59 -05:00
cursor: allow cursor_set_image to accept a NULL image to hide cursor
This commit is contained in:
parent
dafb0526d7
commit
a10fef9ae8
2 changed files with 7 additions and 7 deletions
|
|
@ -378,7 +378,7 @@ static void seat_update_capabilities(struct sway_seat *seat) {
|
|||
|
||||
// Hide cursor if seat doesn't have pointer capability
|
||||
if ((caps & WL_SEAT_CAPABILITY_POINTER) == 0) {
|
||||
wlr_cursor_set_image(seat->cursor->cursor, NULL, 0, 0, 0, 0, 0, 0);
|
||||
cursor_set_image(seat->cursor, NULL, NULL);
|
||||
} else {
|
||||
cursor_set_image(seat->cursor, "left_ptr", NULL);
|
||||
}
|
||||
|
|
@ -561,8 +561,7 @@ void seat_configure_xcursor(struct sway_seat *seat) {
|
|||
output->name, (double)output->scale);
|
||||
}
|
||||
|
||||
wlr_xcursor_manager_set_cursor_image(seat->cursor->xcursor_manager,
|
||||
"left_ptr", seat->cursor->cursor);
|
||||
cursor_set_image(seat->cursor, "left_ptr", NULL);
|
||||
wlr_cursor_warp(seat->cursor->cursor, NULL, seat->cursor->cursor->x,
|
||||
seat->cursor->cursor->y);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue