diff options
author | Simon Ser <contact@emersion.fr> | 2020-04-15 18:19:49 +0200 |
---|---|---|
committer | Drew DeVault <sir@cmpwn.com> | 2020-05-01 16:57:24 +0200 |
commit | f55de073c2a19b3912e363ca4d89f224e83972b7 (patch) | |
tree | 19ce777c994d170a66731b4c59187a4f19b46bf8 | |
parent | 59acc12b32736dc3f7b8b7060c165c2b49359f15 (diff) |
Don't assert the cursor theme loads
If it doesn't load, it's a runtime error, so we shouldn't use an
assertion.
-rw-r--r-- | sway/input/seat.c | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/sway/input/seat.c b/sway/input/seat.c index 36593806..a71d794b 100644 --- a/sway/input/seat.c +++ b/sway/input/seat.c @@ -914,8 +914,10 @@ void seat_configure_xcursor(struct sway_seat *seat) { wlr_xcursor_manager_destroy(seat->cursor->xcursor_manager); seat->cursor->xcursor_manager = wlr_xcursor_manager_create(cursor_theme, cursor_size); - sway_assert(seat->cursor->xcursor_manager, - "Cannot create XCursor manager for theme"); + if (!seat->cursor->xcursor_manager) { + sway_log(SWAY_ERROR, + "Cannot create XCursor manager for theme '%s'", cursor_theme); + } } for (int i = 0; i < root->outputs->length; ++i) { @@ -924,11 +926,11 @@ void seat_configure_xcursor(struct sway_seat *seat) { bool result = wlr_xcursor_manager_load(seat->cursor->xcursor_manager, output->scale); - - sway_assert(!result, - "Cannot load xcursor theme for output '%s' with scale %f", - // TODO: Fractional scaling - output->name, (double)output->scale); + if (!result) { + sway_log(SWAY_ERROR, + "Cannot load xcursor theme for output '%s' with scale %f", + output->name, output->scale); + } } cursor_set_image(seat->cursor, "left_ptr", NULL); |