diff options
Diffstat (limited to 'swaybar')
-rw-r--r-- | swaybar/input.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/swaybar/input.c b/swaybar/input.c index 358c69cb..1e6ace00 100644 --- a/swaybar/input.c +++ b/swaybar/input.c | |||
@@ -81,8 +81,16 @@ void update_cursor(struct swaybar_seat *seat) { | |||
81 | int scale = pointer->current ? pointer->current->scale : 1; | 81 | int scale = pointer->current ? pointer->current->scale : 1; |
82 | pointer->cursor_theme = wl_cursor_theme_load( | 82 | pointer->cursor_theme = wl_cursor_theme_load( |
83 | cursor_theme, cursor_size * scale, seat->bar->shm); | 83 | cursor_theme, cursor_size * scale, seat->bar->shm); |
84 | if (!pointer->cursor_theme) { | ||
85 | sway_log(SWAY_ERROR, "Failed to load cursor theme"); | ||
86 | return; | ||
87 | } | ||
84 | struct wl_cursor *cursor; | 88 | struct wl_cursor *cursor; |
85 | cursor = wl_cursor_theme_get_cursor(pointer->cursor_theme, "default"); | 89 | cursor = wl_cursor_theme_get_cursor(pointer->cursor_theme, "default"); |
90 | if (!cursor) { | ||
91 | sway_log(SWAY_ERROR, "Failed to get default cursor from theme"); | ||
92 | return; | ||
93 | } | ||
86 | pointer->cursor_image = cursor->images[0]; | 94 | pointer->cursor_image = cursor->images[0]; |
87 | wl_surface_set_buffer_scale(pointer->cursor_surface, scale); | 95 | wl_surface_set_buffer_scale(pointer->cursor_surface, scale); |
88 | wl_surface_attach(pointer->cursor_surface, | 96 | wl_surface_attach(pointer->cursor_surface, |