aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Eklöf <daniel@ekloef.se>2023-07-03 12:26:01 +0000
committerDaniel Eklöf <daniel@ekloef.se>2023-07-03 12:36:33 +0000
commitba09d55aabb8979a305c13afe8d51f98e5118410 (patch)
treeab3e755931e60ea917328d2a4d71d1ddbb4e7ea2
parentmeson: log availability of cursor-shape-v1 (diff)
term_xcursor_update_for_seat(): fix missing evaluation of render_xcursor_is_valid()
When compiling *without* cursor-shape-v1 support, term_xcursor_update_for_seat() would incorrectly set shape=CURSOR_SHAPE_CUSTOM, even though no custom cursor had been set by the user. This resulted in a crash in render_xcursor_set(), when trying to use a NULL-string as custom cursor.
-rw-r--r--terminal.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/terminal.c b/terminal.c
index 2d1313c1..fff55019 100644
--- a/terminal.c
+++ b/terminal.c
@@ -3133,7 +3133,7 @@ term_xcursor_update_for_seat(struct terminal *term, struct seat *seat)
#if defined(HAVE_CURSOR_SHAPE)
else if (cursor_string_to_server_shape(term->mouse_user_cursor) != 0
#else
- else if (true
+ else if (false
#endif
|| render_xcursor_is_valid(seat, term->mouse_user_cursor))
{