Don't assert the cursor theme loads
If it doesn't load, it's a runtime error, so we shouldn't use an assertion.
This commit is contained in:
parent
59acc12b32
commit
f55de073c2
|
@ -914,8 +914,10 @@ void seat_configure_xcursor(struct sway_seat *seat) {
|
||||||
wlr_xcursor_manager_destroy(seat->cursor->xcursor_manager);
|
wlr_xcursor_manager_destroy(seat->cursor->xcursor_manager);
|
||||||
seat->cursor->xcursor_manager =
|
seat->cursor->xcursor_manager =
|
||||||
wlr_xcursor_manager_create(cursor_theme, cursor_size);
|
wlr_xcursor_manager_create(cursor_theme, cursor_size);
|
||||||
sway_assert(seat->cursor->xcursor_manager,
|
if (!seat->cursor->xcursor_manager) {
|
||||||
"Cannot create XCursor manager for theme");
|
sway_log(SWAY_ERROR,
|
||||||
|
"Cannot create XCursor manager for theme '%s'", cursor_theme);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
for (int i = 0; i < root->outputs->length; ++i) {
|
for (int i = 0; i < root->outputs->length; ++i) {
|
||||||
|
@ -924,11 +926,11 @@ void seat_configure_xcursor(struct sway_seat *seat) {
|
||||||
bool result =
|
bool result =
|
||||||
wlr_xcursor_manager_load(seat->cursor->xcursor_manager,
|
wlr_xcursor_manager_load(seat->cursor->xcursor_manager,
|
||||||
output->scale);
|
output->scale);
|
||||||
|
if (!result) {
|
||||||
sway_assert(!result,
|
sway_log(SWAY_ERROR,
|
||||||
"Cannot load xcursor theme for output '%s' with scale %f",
|
"Cannot load xcursor theme for output '%s' with scale %f",
|
||||||
// TODO: Fractional scaling
|
output->name, output->scale);
|
||||||
output->name, (double)output->scale);
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
cursor_set_image(seat->cursor, "left_ptr", NULL);
|
cursor_set_image(seat->cursor, "left_ptr", NULL);
|
||||||
|
|
Loading…
Reference in a new issue