changeset 97568:b7e30775f9ce

ns_set_cursor_type: replace with generic from xfns.c
author David Reitter <david.reitter@gmail.com>
date Wed, 20 Aug 2008 17:39:14 +0000
parents 8e871bdf7cab
children 09c3a29de655
files src/nsfns.m
diffstat 1 files changed, 12 insertions(+), 20 deletions(-) [+]
line wrap: on
line diff
--- a/src/nsfns.m	Wed Aug 20 10:59:00 2008 +0000
+++ b/src/nsfns.m	Wed Aug 20 17:39:14 2008 +0000
@@ -413,6 +413,8 @@
 }
 
 
+/* FIXME: adapt to generics */
+
 static void
 ns_set_cursor_color (struct frame *f, Lisp_Object arg, Lisp_Object oldval)
 {
@@ -435,7 +437,6 @@
   update_face_from_frame_parameter (f, Qcursor_color, arg);
 }
 
-
 static void
 ns_set_icon_name (struct frame *f, Lisp_Object arg, Lisp_Object oldval)
 {
@@ -928,27 +929,18 @@
     }
 }
 
-
-static void
-ns_set_cursor_type (struct frame *f, Lisp_Object arg, Lisp_Object oldval)
+/* this is like x_set_cursor_type defined in xfns.c */
+void
+ns_set_cursor_type (f, arg, oldval)
+     FRAME_PTR f;
+     Lisp_Object arg, oldval;
 {
-  int val;
-
-  val = ns_lisp_to_cursor_type (arg);
-  if (val >= 0)
-    {
-      f->output_data.ns->desired_cursor =val;
-    }
-  else
-    {
-      store_frame_param (f, Qcursor_type, oldval);
-      error ("the `cursor-type' frame parameter should be either `no', `box', \
-`hollow', `underscore' or `bar'.");
-    }
-
-  update_mode_lines++;
+  set_frame_cursor_types (f, arg);
+
+  /* Make sure the cursor gets redrawn.  */
+  cursor_type_changed = 1;
 }
-
+
 
 /* 23: called to set mouse pointer color, but all other terms use it to
        initialize pointer types (and don't set the color ;) */