aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLibravatar Simon Ser <contact@emersion.fr>2020-04-15 18:19:49 +0200
committerLibravatar Drew DeVault <sir@cmpwn.com>2020-05-01 16:57:24 +0200
commitf55de073c2a19b3912e363ca4d89f224e83972b7 (patch)
tree19ce777c994d170a66731b4c59187a4f19b46bf8
parentAdd Korean README.md (diff)
downloadsway-f55de073c2a19b3912e363ca4d89f224e83972b7.tar.gz
sway-f55de073c2a19b3912e363ca4d89f224e83972b7.tar.zst
sway-f55de073c2a19b3912e363ca4d89f224e83972b7.zip
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.c16
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) {
914 wlr_xcursor_manager_destroy(seat->cursor->xcursor_manager); 914 wlr_xcursor_manager_destroy(seat->cursor->xcursor_manager);
915 seat->cursor->xcursor_manager = 915 seat->cursor->xcursor_manager =
916 wlr_xcursor_manager_create(cursor_theme, cursor_size); 916 wlr_xcursor_manager_create(cursor_theme, cursor_size);
917 sway_assert(seat->cursor->xcursor_manager, 917 if (!seat->cursor->xcursor_manager) {
918 "Cannot create XCursor manager for theme"); 918 sway_log(SWAY_ERROR,
919 "Cannot create XCursor manager for theme '%s'", cursor_theme);
920 }
919 } 921 }
920 922
921 for (int i = 0; i < root->outputs->length; ++i) { 923 for (int i = 0; i < root->outputs->length; ++i) {
@@ -924,11 +926,11 @@ void seat_configure_xcursor(struct sway_seat *seat) {
924 bool result = 926 bool result =
925 wlr_xcursor_manager_load(seat->cursor->xcursor_manager, 927 wlr_xcursor_manager_load(seat->cursor->xcursor_manager,
926 output->scale); 928 output->scale);
927 929 if (!result) {
928 sway_assert(!result, 930 sway_log(SWAY_ERROR,
929 "Cannot load xcursor theme for output '%s' with scale %f", 931 "Cannot load xcursor theme for output '%s' with scale %f",
930 // TODO: Fractional scaling 932 output->name, output->scale);
931 output->name, (double)output->scale); 933 }
932 } 934 }
933 935
934 cursor_set_image(seat->cursor, "left_ptr", NULL); 936 cursor_set_image(seat->cursor, "left_ptr", NULL);