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

cursor: Rename set_callback() to set_fallback() to match intent #723

Merged
merged 1 commit into from
May 14, 2024

Conversation

MarijnS95
Copy link
Contributor

CC @Decodetalkers based on discussions in #680 (comment).

The intent of this function is to set a fallback that get_cursor() uses when no cursor can be loaded. This fallback is a callback (or closure / Fn in Rust terms) that calculates an optional fallback value based on the given name and size of the requested cursor.

Also make sure this "fallback" setter is properly linked from get_cursor(), making it easier to find when users attempt to understand the docs.

The intent of this function is to set a _fallback_ that `get_cursor()`
uses when no cursor can be loaded.  This fallback _is_ a _callback_
(or _closure_ / `Fn` in Rust terms) that calculates an optional fallback
value based on the given name and size of the requested cursor.

Also make sure this "fallback" setter is properly linked from
`get_cursor()`, making it easier to find when users attempt to
understand the docs.
@elinorbgr
Copy link
Member

LGTM, thanks

@elinorbgr elinorbgr merged commit 987c544 into Smithay:master May 14, 2024
12 checks passed
@MarijnS95 MarijnS95 deleted the cursor-set-fallback branch May 14, 2024 20:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants