From 6717f691111dbeeee6ede368934406ee19ab4f94 Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Thu, 14 Apr 1994 12:07:21 +0000 Subject: [PATCH] (frame_update_line_height): Don't call x_set_window_size. Return 1 if line_height changed. (Fset_face_attribute_internal): Call x_set_window_size here if nec. --- src/xfaces.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/xfaces.c b/src/xfaces.c index 880bbc72c6..8f38e1c955 100644 --- a/src/xfaces.c +++ b/src/xfaces.c @@ -652,9 +652,9 @@ same_size_fonts (font1, font2) } /* Update the line_height of frame F according to the biggest font in - any face, and resize the frame if line_height changes. */ + any face. Return nonzero if if line_height changes. */ -void +int frame_update_line_height (f) FRAME_PTR f; { @@ -671,10 +671,10 @@ frame_update_line_height (f) } if (biggest == f->display.x->line_height) - return; + return 0; f->display.x->line_height = biggest; - x_set_window_size (f, 0, f->width, f->height); + return 1; } /* Modify face TO by copying from FROM all properties which have @@ -986,7 +986,8 @@ DEFUN ("set-face-attribute-internal", Fset_face_attribute_internal, if (face->font != f->display.x->font) unload_font (f, face->font); face->font = font; - frame_update_line_height (f); + if (frame_update_line_height (f)) + x_set_window_size (f, 0, f->width, f->height); } else if (EQ (attr_name, intern ("foreground"))) { -- 2.39.2