+2008-07-19 Adrian Robert <Adrian.B.Robert@gmail.com>
+
+ * nsfns.m (ns_set_background_color): Apply patch from Chong Yidong to
+ fix crash.
+ * nsterm.m (ns_maybe_dumpglyphs_background): Compare result from
+ NS_FACE_BACKGROUND with 0 instead of nil.
+ * nsfont.m (nsfont_draw): Same.
+
2008-07-18 Chong Yidong <cyd@stupidchicken.com>
* Makefile.in (SOME_MACHINE_LISP): Remove ns-carbon-compat.elc.
face = FRAME_DEFAULT_FACE (f);
if (face)
{
- col = NS_FACE_BACKGROUND (face);
+ col = ns_lookup_indexed_color (NS_FACE_BACKGROUND (face), f);
face->background
= (EMACS_UINT) [[col colorWithAlphaComponent: alpha] retain];
[col release];
}
if (!s->face->stipple)
- [(NS_FACE_BACKGROUND (face) != nil
+ [(NS_FACE_BACKGROUND (face) != 0
? ns_lookup_indexed_color (NS_FACE_BACKGROUND (face), s->f)
: FRAME_BACKGROUND_COLOR (s->f)) set];
else
: FRAME_FOREGROUND_COLOR (s->f));
/*PENDING: find another way to pass this */
bgCol = (ns_tmp_flags != NS_DUMPGLYPH_FOREGROUND ? nil
- : (NS_FACE_BACKGROUND (face) != nil
+ : (NS_FACE_BACKGROUND (face) != 0
? ns_lookup_indexed_color (NS_FACE_BACKGROUND (face), s->f)
: FRAME_BACKGROUND_COLOR (s->f)));
else
face = FACE_FROM_ID (s->f, s->first_glyph->face_id);
if (!face->stipple)
- [(NS_FACE_BACKGROUND (face) != nil
+ [(NS_FACE_BACKGROUND (face) != 0
? ns_lookup_indexed_color (NS_FACE_BACKGROUND (face), s->f)
: FRAME_BACKGROUND_COLOR (s->f)) set];
else