aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/xfaces.c37
1 files changed, 12 insertions, 25 deletions
diff --git a/src/xfaces.c b/src/xfaces.c
index f81f1ea4cee..fc58cf2ad02 100644
--- a/src/xfaces.c
+++ b/src/xfaces.c
@@ -972,36 +972,23 @@ load_pixmap (f, name, w_ptr, h_ptr)
972 972
973#ifdef HAVE_X_WINDOWS 973#ifdef HAVE_X_WINDOWS
974 974
975/* Update the line_height of frame F according to the biggest font in 975/* Update the line_height of frame F. Return non-zero if line height
976 any face. Return non-zero if line height changes. */ 976 changes. */
977 977
978int 978int
979frame_update_line_height (f) 979frame_update_line_height (f)
980 struct frame *f; 980 struct frame *f;
981{ 981{
982 int i; 982 int fontset, line_height, changed_p;
983 int fontset = f->output_data.x->fontset; 983
984 int biggest = (fontset > 0 984 fontset = f->output_data.x->fontset;
985 ? FRAME_FONTSET_DATA (f)->fontset_table[fontset]->height 985 if (fontset > 0)
986 : FONT_HEIGHT (f->output_data.x->font)); 986 line_height = FRAME_FONTSET_DATA (f)->fontset_table[fontset]->height;
987 struct face_cache *c = FRAME_FACE_CACHE (f); 987 else
988 int changed_p; 988 line_height = FONT_HEIGHT (f->output_data.x->font);
989 989
990 for (i = 0; i < c->used; ++i) 990 changed_p = line_height != f->output_data.x->line_height;
991 { 991 f->output_data.x->line_height = line_height;
992 struct face *face = c->faces_by_id[i];
993 if (face)
994 {
995 int height
996 = (face->fontset >= 0
997 ? FRAME_FONTSET_DATA (f)->fontset_table[face->fontset]->height
998 : FONT_HEIGHT (face->font));
999 biggest = max (height, biggest);
1000 }
1001 }
1002
1003 changed_p = biggest != f->output_data.x->line_height;
1004 f->output_data.x->line_height = biggest;
1005 return changed_p; 992 return changed_p;
1006} 993}
1007 994