From: Gerd Moellmann Date: Thu, 30 Nov 2000 11:56:35 +0000 (+0000) Subject: (x_estimate_mode_line_height): If `mode-line' face X-Git-Tag: emacs-pretest-21.0.93~358 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=43281ee3f4b699d86ba12c23871758976c267e74;p=emacs.git (x_estimate_mode_line_height): If `mode-line' face hasn't a font, use that of the frame, as drawing glyphs does. --- diff --git a/src/xterm.c b/src/xterm.c index 01b8c5be56e..7a2260c6826 100644 --- a/src/xterm.c +++ b/src/xterm.c @@ -2326,7 +2326,7 @@ x_estimate_mode_line_height (f, face_id) struct frame *f; enum face_id face_id; { - int height = 1; + int height = FONT_HEIGHT (FRAME_FONT (f)); /* This function is called so early when Emacs starts that the face cache and mode line face are not yet initialized. */ @@ -2334,7 +2334,11 @@ x_estimate_mode_line_height (f, face_id) { struct face *face = FACE_FROM_ID (f, face_id); if (face) - height = FONT_HEIGHT (face->font) + 2 * face->box_line_width; + { + if (face->font) + height = FONT_HEIGHT (face->font); + height += 2 * face->box_line_width; + } } return height;