Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

swaynag: handle wayland-cursor failures #7672

Merged
merged 1 commit into from
Jul 17, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions swaynag/swaynag.c
Original file line number Diff line number Diff line change
Expand Up @@ -153,8 +153,16 @@ static void update_cursor(struct swaynag_seat *seat) {
}
pointer->cursor_theme = wl_cursor_theme_load(
cursor_theme, cursor_size * swaynag->scale, swaynag->shm);
if (!pointer->cursor_theme) {
sway_log(SWAY_ERROR, "Failed to load cursor theme");
return;
}
struct wl_cursor *cursor =
wl_cursor_theme_get_cursor(pointer->cursor_theme, "default");
if (!cursor) {
sway_log(SWAY_ERROR, "Failed to get default cursor from theme");
return;
}
pointer->cursor_image = cursor->images[0];
wl_surface_set_buffer_scale(pointer->cursor_surface,
swaynag->scale);
Expand Down