diff options
| author | Kim F. Storm | 2002-02-08 23:48:02 +0000 |
|---|---|---|
| committer | Kim F. Storm | 2002-02-08 23:48:02 +0000 |
| commit | 96d2320fdc517502077ef69b39ff8064de9066d2 (patch) | |
| tree | 073894f706b75aa2b84436a0026e9080b20ad0bf /src | |
| parent | d191623b30fbfc868a62ccd4e71418b76a4974ab (diff) | |
| download | emacs-96d2320fdc517502077ef69b39ff8064de9066d2.tar.gz emacs-96d2320fdc517502077ef69b39ff8064de9066d2.zip | |
(window_box_height): Use CURRENT_MODE_LINE_FACE_ID.
(pos_visible_p, handle_face_prop): Likewise.
(display_mode_lines): Likewise, but for the real selected window.
(init_iterator) [row == NULL]: Handle MODE_LINE_INACTIVE_FACE_ID.
Diffstat (limited to 'src')
| -rw-r--r-- | src/xdisp.c | 25 |
1 files changed, 14 insertions, 11 deletions
diff --git a/src/xdisp.c b/src/xdisp.c index d7ae5a4e6cc..dff53b80b86 100644 --- a/src/xdisp.c +++ b/src/xdisp.c | |||
| @@ -895,7 +895,7 @@ window_box_height (w) | |||
| 895 | if (ml_row && ml_row->mode_line_p) | 895 | if (ml_row && ml_row->mode_line_p) |
| 896 | height -= ml_row->height; | 896 | height -= ml_row->height; |
| 897 | else | 897 | else |
| 898 | height -= estimate_mode_line_height (f, MODE_LINE_FACE_ID); | 898 | height -= estimate_mode_line_height (f, CURRENT_MODE_LINE_FACE_ID (w)); |
| 899 | } | 899 | } |
| 900 | 900 | ||
| 901 | if (WINDOW_WANTS_HEADER_LINE_P (w)) | 901 | if (WINDOW_WANTS_HEADER_LINE_P (w)) |
| @@ -1078,7 +1078,7 @@ pos_visible_p (w, charpos, fully, exact_mode_line_heights_p) | |||
| 1078 | { | 1078 | { |
| 1079 | if (WINDOW_WANTS_MODELINE_P (w)) | 1079 | if (WINDOW_WANTS_MODELINE_P (w)) |
| 1080 | current_mode_line_height | 1080 | current_mode_line_height |
| 1081 | = display_mode_line (w, MODE_LINE_FACE_ID, | 1081 | = display_mode_line (w, CURRENT_MODE_LINE_FACE_ID (w), |
| 1082 | current_buffer->mode_line_format); | 1082 | current_buffer->mode_line_format); |
| 1083 | 1083 | ||
| 1084 | if (WINDOW_WANTS_HEADER_LINE_P (w)) | 1084 | if (WINDOW_WANTS_HEADER_LINE_P (w)) |
| @@ -1456,13 +1456,14 @@ check_window_end (w) | |||
| 1456 | will produce glyphs in that row. | 1456 | will produce glyphs in that row. |
| 1457 | 1457 | ||
| 1458 | BASE_FACE_ID is the id of a base face to use. It must be one of | 1458 | BASE_FACE_ID is the id of a base face to use. It must be one of |
| 1459 | DEFAULT_FACE_ID for normal text, MODE_LINE_FACE_ID or | 1459 | DEFAULT_FACE_ID for normal text, MODE_LINE_FACE_ID, |
| 1460 | HEADER_LINE_FACE_ID for displaying mode lines, or TOOL_BAR_FACE_ID for | 1460 | MODE_LINE_INACTIVE_FACE_ID, or HEADER_LINE_FACE_ID for displaying |
| 1461 | displaying the tool-bar. | 1461 | mode lines, or TOOL_BAR_FACE_ID for displaying the tool-bar. |
| 1462 | 1462 | ||
| 1463 | If ROW is null and BASE_FACE_ID is equal to MODE_LINE_FACE_ID or | 1463 | If ROW is null and BASE_FACE_ID is equal to MODE_LINE_FACE_ID, |
| 1464 | HEADER_LINE_FACE_ID, the iterator will be initialized to use the | 1464 | MODE_LINE_INACTIVE_FACE_ID, or HEADER_LINE_FACE_ID, the iterator |
| 1465 | corresponding mode line glyph row of the desired matrix of W. */ | 1465 | will be initialized to use the corresponding mode line glyph row of |
| 1466 | the desired matrix of W. */ | ||
| 1466 | 1467 | ||
| 1467 | void | 1468 | void |
| 1468 | init_iterator (it, w, charpos, bytepos, row, base_face_id) | 1469 | init_iterator (it, w, charpos, bytepos, row, base_face_id) |
| @@ -1492,7 +1493,8 @@ init_iterator (it, w, charpos, bytepos, row, base_face_id) | |||
| 1492 | appropriate. */ | 1493 | appropriate. */ |
| 1493 | if (row == NULL) | 1494 | if (row == NULL) |
| 1494 | { | 1495 | { |
| 1495 | if (base_face_id == MODE_LINE_FACE_ID) | 1496 | if (base_face_id == MODE_LINE_FACE_ID |
| 1497 | || base_face_id == MODE_LINE_INACTIVE_FACE_ID) | ||
| 1496 | row = MATRIX_MODE_LINE_ROW (w->desired_matrix); | 1498 | row = MATRIX_MODE_LINE_ROW (w->desired_matrix); |
| 1497 | else if (base_face_id == HEADER_LINE_FACE_ID) | 1499 | else if (base_face_id == HEADER_LINE_FACE_ID) |
| 1498 | row = MATRIX_HEADER_LINE_ROW (w->desired_matrix); | 1500 | row = MATRIX_HEADER_LINE_ROW (w->desired_matrix); |
| @@ -2354,7 +2356,7 @@ handle_face_prop (it) | |||
| 2354 | use the mode line face instead of the frame's default face. */ | 2356 | use the mode line face instead of the frame's default face. */ |
| 2355 | if (it->glyph_row == MATRIX_MODE_LINE_ROW (it->w->desired_matrix) | 2357 | if (it->glyph_row == MATRIX_MODE_LINE_ROW (it->w->desired_matrix) |
| 2356 | && new_face_id == DEFAULT_FACE_ID) | 2358 | && new_face_id == DEFAULT_FACE_ID) |
| 2357 | new_face_id = MODE_LINE_FACE_ID; | 2359 | new_face_id = CURRENT_MODE_LINE_FACE_ID (it->w); |
| 2358 | #endif | 2360 | #endif |
| 2359 | 2361 | ||
| 2360 | /* Is this a start of a run of characters with box? Caveat: | 2362 | /* Is this a start of a run of characters with box? Caveat: |
| @@ -13431,7 +13433,8 @@ display_mode_lines (w) | |||
| 13431 | 13433 | ||
| 13432 | if (WINDOW_WANTS_MODELINE_P (w)) | 13434 | if (WINDOW_WANTS_MODELINE_P (w)) |
| 13433 | { | 13435 | { |
| 13434 | display_mode_line (w, MODE_LINE_FACE_ID, | 13436 | /* Select mode line face based on the real selected window. */ |
| 13437 | display_mode_line (w, CURRENT_MODE_LINE_FACE_ID (old_selected_window), | ||
| 13435 | current_buffer->mode_line_format); | 13438 | current_buffer->mode_line_format); |
| 13436 | ++n; | 13439 | ++n; |
| 13437 | } | 13440 | } |