mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2025-11-17 06:59:43 -05:00
wlr_cursor: use default shape if requested shape missing
(cherry picked from commit b97106ddcb)
This commit is contained in:
parent
38f18cd684
commit
f02d3ef28b
1 changed files with 9 additions and 3 deletions
|
|
@ -574,9 +574,15 @@ static void cursor_output_cursor_update(struct wlr_cursor_output_cursor *output_
|
||||||
wlr_xcursor_manager_load(manager, scale);
|
wlr_xcursor_manager_load(manager, scale);
|
||||||
struct wlr_xcursor *xcursor = wlr_xcursor_manager_get_xcursor(manager, name, scale);
|
struct wlr_xcursor *xcursor = wlr_xcursor_manager_get_xcursor(manager, name, scale);
|
||||||
if (xcursor == NULL) {
|
if (xcursor == NULL) {
|
||||||
wlr_log(WLR_DEBUG, "XCursor theme is missing '%s' cursor", name);
|
/* Try the default cursor: better the wrong image than an invisible
|
||||||
wlr_output_cursor_set_buffer(output_cursor->output_cursor, NULL, 0, 0);
|
* (and therefore practically unusable) cursor */
|
||||||
return;
|
wlr_log(WLR_DEBUG, "XCursor theme is missing '%s' cursor, falling back to 'default'", name);
|
||||||
|
xcursor = wlr_xcursor_manager_get_xcursor(manager, "default", scale);
|
||||||
|
if (xcursor == NULL) {
|
||||||
|
wlr_log(WLR_DEBUG, "XCursor theme is missing a 'default' cursor");
|
||||||
|
wlr_output_cursor_set_buffer(output_cursor->output_cursor, NULL, 0, 0);
|
||||||
|
return;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
output_cursor->xcursor = xcursor;
|
output_cursor->xcursor = xcursor;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue