aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJan Djärv2010-12-02 09:24:16 +0100
committerJan Djärv2010-12-02 09:24:16 +0100
commit9583e9a03cf4980041a97d397682d0e1861aa1a7 (patch)
tree45cfc1d1e45356f12d422b97bc3355f05013a22e /src
parentf7ca27a1ef148f7d8c1a3238f067a7d6d289fdd0 (diff)
downloademacs-9583e9a03cf4980041a97d397682d0e1861aa1a7.tar.gz
emacs-9583e9a03cf4980041a97d397682d0e1861aa1a7.zip
Draw text under filled box cursor in inverted color (Bug#7479).
* src/nsterm.m (ns_draw_glyph_string): Switch fore- and background if drawing text under filled box cursor.
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog5
-rw-r--r--src/nsterm.m14
2 files changed, 19 insertions, 0 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index b1d67c9c31f..83d6d4c6e88 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,8 @@
12010-12-02 Jan Djärv <jan.h.d@swipnet.se>
2
3 * nsterm.m (ns_draw_glyph_string): Switch fore- and background if
4 drawing text under filled box cursor (Bug#7479).
5
12010-11-27 Kenichi Handa <handa@m17n.org> 62010-11-27 Kenichi Handa <handa@m17n.org>
2 7
3 * charset.c (emacs_mule_charset): Make it an array of charset ID; 8 * charset.c (emacs_mule_charset): Make it an array of charset ID;
diff --git a/src/nsterm.m b/src/nsterm.m
index 3adb67717d5..128c9de86a0 100644
--- a/src/nsterm.m
+++ b/src/nsterm.m
@@ -2996,11 +2996,25 @@ ns_draw_glyph_string (struct glyph_string *s)
2996 if (ns_tmp_font == NULL) 2996 if (ns_tmp_font == NULL)
2997 ns_tmp_font = (struct nsfont_info *)FRAME_FONT (s->f); 2997 ns_tmp_font = (struct nsfont_info *)FRAME_FONT (s->f);
2998 2998
2999 if (s->hl == DRAW_CURSOR && s->w->phys_cursor_type == FILLED_BOX_CURSOR)
3000 {
3001 unsigned long tmp = NS_FACE_BACKGROUND (s->face);
3002 NS_FACE_BACKGROUND (s->face) = NS_FACE_FOREGROUND (s->face);
3003 NS_FACE_FOREGROUND (s->face) = tmp;
3004 }
3005
2999 ns_tmp_font->font.driver->draw 3006 ns_tmp_font->font.driver->draw
3000 (s, 0, s->nchars, s->x, s->y, 3007 (s, 0, s->nchars, s->x, s->y,
3001 (ns_tmp_flags == NS_DUMPGLYPH_NORMAL && !s->background_filled_p) 3008 (ns_tmp_flags == NS_DUMPGLYPH_NORMAL && !s->background_filled_p)
3002 || ns_tmp_flags == NS_DUMPGLYPH_MOUSEFACE); 3009 || ns_tmp_flags == NS_DUMPGLYPH_MOUSEFACE);
3003 3010
3011 if (s->hl == DRAW_CURSOR && s->w->phys_cursor_type == FILLED_BOX_CURSOR)
3012 {
3013 unsigned long tmp = NS_FACE_BACKGROUND (s->face);
3014 NS_FACE_BACKGROUND (s->face) = NS_FACE_FOREGROUND (s->face);
3015 NS_FACE_FOREGROUND (s->face) = tmp;
3016 }
3017
3004 ns_unfocus (s->f); 3018 ns_unfocus (s->f);
3005 break; 3019 break;
3006 3020