# HG changeset patch # User David Reitter # Date 1219253954 0 # Node ID b7e30775f9ce70b4cb5d05c34249683c4ada22f0 # Parent 8e871bdf7cab61b301b0212f7c8ba2700904b38c ns_set_cursor_type: replace with generic from xfns.c diff -r 8e871bdf7cab -r b7e30775f9ce src/nsfns.m --- 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 ;) */