I fixed this with a horrible patch, which probably only works for box
cursors. (Somewhat based on x_set_cursor_gc().)

Unfortunately, there's still another issue: When opening another
window, the cursor settings are lost.

If anyone else would like to try it, here's the git diff:

diff --git a/src/nsfont.m b/src/nsfont.m
index 60e217f..40c99ea 100644
--- a/src/nsfont.m
+++ b/src/nsfont.m
@@ -1147,6 +1147,14 @@ nsfont_draw (struct glyph_string *s, int from,
int to, int x, int y,
       NSRectFill (br);
     }

+  if (s->hl == DRAW_CURSOR)
+    {
+      if (ns_index_color (FRAME_CURSOR_COLOR (s->f), s->f) ==
NS_FACE_BACKGROUND (face))
+        {
+          [ns_lookup_indexed_color (NS_FACE_FOREGROUND (face), s->f) set];
+          NSRectFill (r);
+        }
+    }

   /* set up for character rendering */
   r.origin.y += font->voffset + (s->height - font->height)/2;
@@ -1160,6 +1168,13 @@ nsfont_draw (struct glyph_string *s, int from,
int to, int x, int y,
               ? ns_lookup_indexed_color (NS_FACE_BACKGROUND (face), s->f)
               : FRAME_BACKGROUND_COLOR (s->f)));

+  if (s->hl == DRAW_CURSOR)
+    {
+      col = NS_FACE_BACKGROUND (face) != 0
+        ? ns_lookup_indexed_color (NS_FACE_BACKGROUND (face), s->f)
+        : FRAME_BACKGROUND_COLOR (s->f);
+    }
+
   /* render under GNUstep using DPS */
 #ifdef NS_IMPL_GNUSTEP
   {



Den 24 september 2009 07.51 skrev Björn Töpel <bjorn.to...@gmail.com>:
> My CVS Emacs.app [1] doesn't seem to invert the glyph inside a
> box cursor, which is the case for X Windows Emacs. Can this
> behavior be altered in the dot emacs file or should I report it
> as a bug?
>
> The current cursor settings in my dot emacs are:
> (set-cursor-color     "Black")
> (blink-cursor-mode -1)
>
>
> Björn
>
>
> [1] GNU Emacs 23.1.50.1 (i386-apple-darwin10.0.0, NS
> apple-appkit-1038.11) of 2009-09-18.
>
> ------------------------------------------------------------------------------
> Come build with us! The BlackBerry&reg; Developer Conference in SF, CA
> is the only developer event you need to attend this year. Jumpstart your
> developing skills, take BlackBerry mobile applications to market and stay
> ahead of the curve. Join us from November 9&#45;12, 2009. Register now&#33;
> http://p.sf.net/sfu/devconf
> _______________________________________________
> Emacs-app-dev- mailing list
> Emacs-app-dev-@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/emacs-app-dev-
>

------------------------------------------------------------------------------
Come build with us! The BlackBerry&reg; Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9&#45;12, 2009. Register now&#33;
http://p.sf.net/sfu/devconf
_______________________________________________
Emacs-app-dev- mailing list
Emacs-app-dev-@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emacs-app-dev-

Reply via email to