From 08ac8554879dbb254972cc7e40e0ec62d807a533 Mon Sep 17 00:00:00 2001 From: Gerd Moellmann Date: Wed, 8 Mar 2000 14:48:16 +0000 Subject: [PATCH] (x_set_cursor_type): If ARG is nil, give frame no cursor. --- src/xfns.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/xfns.c b/src/xfns.c index 7f88e227034..0282f651d0e 100644 --- a/src/xfns.c +++ b/src/xfns.c @@ -1695,12 +1695,16 @@ x_set_cursor_type (f, arg, oldval) FRAME_DESIRED_CURSOR (f) = BAR_CURSOR; f->output_data.x->cursor_width = 2; } - else if (CONSP (arg) && EQ (XCAR (arg), Qbar) - && INTEGERP (XCDR (arg))) + else if (CONSP (arg) + && EQ (XCAR (arg), Qbar) + && INTEGERP (XCDR (arg)) + && XINT (XCDR (arg)) >= 0) { FRAME_DESIRED_CURSOR (f) = BAR_CURSOR; f->output_data.x->cursor_width = XINT (XCDR (arg)); } + else if (NILP (arg)) + FRAME_DESIRED_CURSOR (f) = NO_CURSOR; else /* Treat anything unknown as "box cursor". It was bad to signal an error; people have trouble fixing -- 2.39.5