diff options
| author | Adrian Robert | 2008-07-19 17:01:36 +0000 |
|---|---|---|
| committer | Adrian Robert | 2008-07-19 17:01:36 +0000 |
| commit | 45d325c4d16ce9dbe00bba3d265c0d7b2d1fa58b (patch) | |
| tree | 0da99608ae8fd8876d68bf041c90198d0ddf2132 | |
| parent | b68e7decb6a7fc8d8ac868d8c5712a8feb379eb4 (diff) | |
| download | emacs-45d325c4d16ce9dbe00bba3d265c0d7b2d1fa58b.tar.gz emacs-45d325c4d16ce9dbe00bba3d265c0d7b2d1fa58b.zip | |
apply fix from Chong Yidong to NS port ns_set_background_color(), and clean up comparison use of result from NS_FACE_BACKGROUND
| -rw-r--r-- | src/ChangeLog | 8 | ||||
| -rw-r--r-- | src/nsfns.m | 2 | ||||
| -rw-r--r-- | src/nsfont.m | 4 | ||||
| -rw-r--r-- | src/nsterm.m | 2 |
4 files changed, 12 insertions, 4 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index 723066bbb72..95ccdc5f303 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,3 +1,11 @@ | |||
| 1 | 2008-07-19 Adrian Robert <Adrian.B.Robert@gmail.com> | ||
| 2 | |||
| 3 | * nsfns.m (ns_set_background_color): Apply patch from Chong Yidong to | ||
| 4 | fix crash. | ||
| 5 | * nsterm.m (ns_maybe_dumpglyphs_background): Compare result from | ||
| 6 | NS_FACE_BACKGROUND with 0 instead of nil. | ||
| 7 | * nsfont.m (nsfont_draw): Same. | ||
| 8 | |||
| 1 | 2008-07-18 Chong Yidong <cyd@stupidchicken.com> | 9 | 2008-07-18 Chong Yidong <cyd@stupidchicken.com> |
| 2 | 10 | ||
| 3 | * Makefile.in (SOME_MACHINE_LISP): Remove ns-carbon-compat.elc. | 11 | * Makefile.in (SOME_MACHINE_LISP): Remove ns-carbon-compat.elc. |
diff --git a/src/nsfns.m b/src/nsfns.m index 1752512d2dc..72ac1ece4b3 100644 --- a/src/nsfns.m +++ b/src/nsfns.m | |||
| @@ -400,7 +400,7 @@ ns_set_background_color (struct frame *f, Lisp_Object arg, Lisp_Object oldval) | |||
| 400 | face = FRAME_DEFAULT_FACE (f); | 400 | face = FRAME_DEFAULT_FACE (f); |
| 401 | if (face) | 401 | if (face) |
| 402 | { | 402 | { |
| 403 | col = NS_FACE_BACKGROUND (face); | 403 | col = ns_lookup_indexed_color (NS_FACE_BACKGROUND (face), f); |
| 404 | face->background | 404 | face->background |
| 405 | = (EMACS_UINT) [[col colorWithAlphaComponent: alpha] retain]; | 405 | = (EMACS_UINT) [[col colorWithAlphaComponent: alpha] retain]; |
| 406 | [col release]; | 406 | [col release]; |
diff --git a/src/nsfont.m b/src/nsfont.m index bbf991e7d49..d6aa9ac65e5 100644 --- a/src/nsfont.m +++ b/src/nsfont.m | |||
| @@ -968,7 +968,7 @@ nsfont_draw (struct glyph_string *s, int from, int to, int x, int y, | |||
| 968 | } | 968 | } |
| 969 | 969 | ||
| 970 | if (!s->face->stipple) | 970 | if (!s->face->stipple) |
| 971 | [(NS_FACE_BACKGROUND (face) != nil | 971 | [(NS_FACE_BACKGROUND (face) != 0 |
| 972 | ? ns_lookup_indexed_color (NS_FACE_BACKGROUND (face), s->f) | 972 | ? ns_lookup_indexed_color (NS_FACE_BACKGROUND (face), s->f) |
| 973 | : FRAME_BACKGROUND_COLOR (s->f)) set]; | 973 | : FRAME_BACKGROUND_COLOR (s->f)) set]; |
| 974 | else | 974 | else |
| @@ -988,7 +988,7 @@ nsfont_draw (struct glyph_string *s, int from, int to, int x, int y, | |||
| 988 | : FRAME_FOREGROUND_COLOR (s->f)); | 988 | : FRAME_FOREGROUND_COLOR (s->f)); |
| 989 | /*PENDING: find another way to pass this */ | 989 | /*PENDING: find another way to pass this */ |
| 990 | bgCol = (ns_tmp_flags != NS_DUMPGLYPH_FOREGROUND ? nil | 990 | bgCol = (ns_tmp_flags != NS_DUMPGLYPH_FOREGROUND ? nil |
| 991 | : (NS_FACE_BACKGROUND (face) != nil | 991 | : (NS_FACE_BACKGROUND (face) != 0 |
| 992 | ? ns_lookup_indexed_color (NS_FACE_BACKGROUND (face), s->f) | 992 | ? ns_lookup_indexed_color (NS_FACE_BACKGROUND (face), s->f) |
| 993 | : FRAME_BACKGROUND_COLOR (s->f))); | 993 | : FRAME_BACKGROUND_COLOR (s->f))); |
| 994 | 994 | ||
diff --git a/src/nsterm.m b/src/nsterm.m index 60763645144..f0d8b5af734 100644 --- a/src/nsterm.m +++ b/src/nsterm.m | |||
| @@ -2692,7 +2692,7 @@ ns_maybe_dumpglyphs_background (struct glyph_string *s, char force_p) | |||
| 2692 | else | 2692 | else |
| 2693 | face = FACE_FROM_ID (s->f, s->first_glyph->face_id); | 2693 | face = FACE_FROM_ID (s->f, s->first_glyph->face_id); |
| 2694 | if (!face->stipple) | 2694 | if (!face->stipple) |
| 2695 | [(NS_FACE_BACKGROUND (face) != nil | 2695 | [(NS_FACE_BACKGROUND (face) != 0 |
| 2696 | ? ns_lookup_indexed_color (NS_FACE_BACKGROUND (face), s->f) | 2696 | ? ns_lookup_indexed_color (NS_FACE_BACKGROUND (face), s->f) |
| 2697 | : FRAME_BACKGROUND_COLOR (s->f)) set]; | 2697 | : FRAME_BACKGROUND_COLOR (s->f)) set]; |
| 2698 | else | 2698 | else |