summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGerd Moellmann <gerd@gnu.org>2000-06-02 19:03:58 +0000
committerGerd Moellmann <gerd@gnu.org>2000-06-02 19:03:58 +0000
commite911049b46512f90759afafb22d9c215835476ce (patch)
tree2791e8e4dc439b561259431062b3bd405104a234
parent033e3e18df29b7e9cf98f4ae66125b06774b0af1 (diff)
downloademacs-e911049b46512f90759afafb22d9c215835476ce.tar.gz
(realize_x_face): When copying BASE_FACE bitwise to the
result face, set flags in the face indicating that colors may not be freed.
-rw-r--r--src/xfaces.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/xfaces.c b/src/xfaces.c
index f39a2936b6e..7dd4e5ba7e1 100644
--- a/src/xfaces.c
+++ b/src/xfaces.c
@@ -5859,7 +5859,17 @@ realize_x_face (cache, attrs, c, base_face)
{
bcopy (base_face, face, sizeof *face);
face->gc = 0;
- face->font = NULL; /* to force realize_face to load font */
+
+ /* Don't try to free the colors copied bitwise from BASE_FACE. */
+ face->foreground_defaulted_p = 1;
+ face->background_defaulted_p = 1;
+ face->underline_defaulted_p = 1;
+ face->overline_color_defaulted_p = 1;
+ face->strike_through_color_defaulted_p = 1;
+ face->box_color_defaulted_p = 1;
+
+ /* to force realize_face to load font */
+ face->font = NULL;
return face;
}