changeset 10742:e4d6f6f1fc17

(x_set_cursor_type): Set cursor_width field. Handle args of form (bar . WIDTH).
author Richard M. Stallman <rms@gnu.org>
date Tue, 14 Feb 1995 09:42:14 +0000
parents 2bbb48f3dd0c
children 6977bff3ff38
files src/xfns.c
diffstat 1 files changed, 14 insertions(+), 12 deletions(-) [+]
line wrap: on
line diff
--- a/src/xfns.c	Tue Feb 14 09:41:37 1995 +0000
+++ b/src/xfns.c	Tue Feb 14 09:42:14 1995 +0000
@@ -1305,19 +1305,21 @@
      Lisp_Object arg, oldval;
 {
   if (EQ (arg, Qbar))
-    FRAME_DESIRED_CURSOR (f) = bar_cursor;
+    {
+      FRAME_DESIRED_CURSOR (f) = bar_cursor;
+      f->display.x->cursor_width = 2;
+    }
+  else if (CONSP (arg) && EQ (XCONS (arg)->car, Qbar)
+	   && INTEGERP (XCONS (arg)->cdr))
+    {
+      FRAME_DESIRED_CURSOR (f) = bar_cursor;
+      f->display.x->cursor_width = XINT (XCONS (arg)->cdr);
+    }
   else
-#if 0
-    if (EQ (arg, Qbox))
-#endif
-      FRAME_DESIRED_CURSOR (f) = filled_box_cursor;
-  /* Error messages commented out because people have trouble fixing
-     .Xdefaults with Emacs, when it has something bad in it.  */
-#if 0
-  else
-    error
-      ("the `cursor-type' frame parameter should be either `bar' or `box'");
-#endif
+    /* Treat anything unknown as "box cursor".
+       It was bad to signal an error; people have trouble fixing
+       .Xdefaults with Emacs, when it has something bad in it.  */
+    FRAME_DESIRED_CURSOR (f) = filled_box_cursor;
 
   /* Make sure the cursor gets redrawn.  This is overkill, but how
      often do people change cursor types?  */