mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-02-15 22:05:24 -05:00
render: add render_xcursor_is_valid()
Returns true if the provided cursor name is non-NULL, and exist in the currently loaded xcursor theme.
This commit is contained in:
parent
92ebe00927
commit
e4f9dc7d58
2 changed files with 11 additions and 1 deletions
8
render.c
8
render.c
|
|
@ -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)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue