diff options
| author | Daniel Eklöf <daniel@ekloef.se> | 2022-01-01 12:56:15 +0000 |
|---|---|---|
| committer | Daniel Eklöf <daniel@ekloef.se> | 2022-02-07 16:28:37 +0000 |
| commit | e4f9dc7d581cf134e850bd02a9c4ae3e5989905a (patch) | |
| tree | 1a448868b42aadf136bfd8384ce5bfc15b44b280 /render.c | |
| parent | render: call wl_cursor_theme_get_cursor() earlier (diff) | |
render: add render_xcursor_is_valid()
Returns true if the provided cursor name is non-NULL, and exist in the
currently loaded xcursor theme.
Diffstat (limited to 'render.c')
| -rw-r--r-- | render.c | 8 |
1 files changed, 8 insertions, 0 deletions
@@ -3801,6 +3801,14 @@ static const struct wl_callback_listener xcursor_listener = { .done = &xcursor_callback, }; +bool +render_xcursor_is_valid(const struct seat *seat, const char *cursor) +{ + if (cursor == NULL) + return false; + return wl_cursor_theme_get_cursor(seat->pointer.theme, cursor) != NULL; +} + static void render_xcursor_update(struct seat *seat) { |
