diff options
| author | Gerd Moellmann | 2000-11-30 11:56:35 +0000 |
|---|---|---|
| committer | Gerd Moellmann | 2000-11-30 11:56:35 +0000 |
| commit | 43281ee3f4b699d86ba12c23871758976c267e74 (patch) | |
| tree | 5ccc02bed4d442813e0b97614d6d5cb5815cb750 /src | |
| parent | 4dd4cc14645dc8ca89b76295bf85a4fa09862d9d (diff) | |
| download | emacs-43281ee3f4b699d86ba12c23871758976c267e74.tar.gz emacs-43281ee3f4b699d86ba12c23871758976c267e74.zip | |
(x_estimate_mode_line_height): If `mode-line' face
hasn't a font, use that of the frame, as drawing glyphs
does.
Diffstat (limited to 'src')
| -rw-r--r-- | src/xterm.c | 8 |
1 files changed, 6 insertions, 2 deletions
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) | |||
| 2326 | struct frame *f; | 2326 | struct frame *f; |
| 2327 | enum face_id face_id; | 2327 | enum face_id face_id; |
| 2328 | { | 2328 | { |
| 2329 | int height = 1; | 2329 | int height = FONT_HEIGHT (FRAME_FONT (f)); |
| 2330 | 2330 | ||
| 2331 | /* This function is called so early when Emacs starts that the face | 2331 | /* This function is called so early when Emacs starts that the face |
| 2332 | cache and mode line face are not yet initialized. */ | 2332 | cache and mode line face are not yet initialized. */ |
| @@ -2334,7 +2334,11 @@ x_estimate_mode_line_height (f, face_id) | |||
| 2334 | { | 2334 | { |
| 2335 | struct face *face = FACE_FROM_ID (f, face_id); | 2335 | struct face *face = FACE_FROM_ID (f, face_id); |
| 2336 | if (face) | 2336 | if (face) |
| 2337 | height = FONT_HEIGHT (face->font) + 2 * face->box_line_width; | 2337 | { |
| 2338 | if (face->font) | ||
| 2339 | height = FONT_HEIGHT (face->font); | ||
| 2340 | height += 2 * face->box_line_width; | ||
| 2341 | } | ||
| 2338 | } | 2342 | } |
| 2339 | 2343 | ||
| 2340 | return height; | 2344 | return height; |