diff options
Diffstat (limited to 'src/window.c')
| -rw-r--r-- | src/window.c | 134 |
1 files changed, 115 insertions, 19 deletions
diff --git a/src/window.c b/src/window.c index 321b3e01b79..95197985e84 100644 --- a/src/window.c +++ b/src/window.c | |||
| @@ -1002,6 +1002,7 @@ static int | |||
| 1002 | window_body_height (struct window *w, bool pixelwise) | 1002 | window_body_height (struct window *w, bool pixelwise) |
| 1003 | { | 1003 | { |
| 1004 | int height = (w->pixel_height | 1004 | int height = (w->pixel_height |
| 1005 | - WINDOW_TAB_LINE_HEIGHT (w) | ||
| 1005 | - WINDOW_HEADER_LINE_HEIGHT (w) | 1006 | - WINDOW_HEADER_LINE_HEIGHT (w) |
| 1006 | - (WINDOW_HAS_HORIZONTAL_SCROLL_BAR (w) | 1007 | - (WINDOW_HAS_HORIZONTAL_SCROLL_BAR (w) |
| 1007 | ? WINDOW_SCROLL_BAR_AREA_HEIGHT (w) | 1008 | ? WINDOW_SCROLL_BAR_AREA_HEIGHT (w) |
| @@ -1131,6 +1132,15 @@ WINDOW must be a live window and defaults to the selected one. */) | |||
| 1131 | return (make_fixnum (WINDOW_HEADER_LINE_HEIGHT (decode_live_window (window)))); | 1132 | return (make_fixnum (WINDOW_HEADER_LINE_HEIGHT (decode_live_window (window)))); |
| 1132 | } | 1133 | } |
| 1133 | 1134 | ||
| 1135 | DEFUN ("window-tab-line-height", Fwindow_tab_line_height, | ||
| 1136 | Swindow_tab_line_height, 0, 1, 0, | ||
| 1137 | doc: /* Return the height in pixels of WINDOW's tab-line. | ||
| 1138 | WINDOW must be a live window and defaults to the selected one. */) | ||
| 1139 | (Lisp_Object window) | ||
| 1140 | { | ||
| 1141 | return (make_fixnum (WINDOW_TAB_LINE_HEIGHT (decode_live_window (window)))); | ||
| 1142 | } | ||
| 1143 | |||
| 1134 | DEFUN ("window-right-divider-width", Fwindow_right_divider_width, | 1144 | DEFUN ("window-right-divider-width", Fwindow_right_divider_width, |
| 1135 | Swindow_right_divider_width, 0, 1, 0, | 1145 | Swindow_right_divider_width, 0, 1, 0, |
| 1136 | doc: /* Return the width in pixels of WINDOW's right divider. | 1146 | doc: /* Return the width in pixels of WINDOW's right divider. |
| @@ -1249,7 +1259,8 @@ end-trigger value is reset to nil. */) | |||
| 1249 | if it is on the border between the window and its right sibling, | 1259 | if it is on the border between the window and its right sibling, |
| 1250 | return ON_VERTICAL_BORDER; | 1260 | return ON_VERTICAL_BORDER; |
| 1251 | if it is on a scroll bar, return ON_SCROLL_BAR; | 1261 | if it is on a scroll bar, return ON_SCROLL_BAR; |
| 1252 | if it is on the window's top line, return ON_HEADER_LINE; | 1262 | if it is on the window's top line, return ON_TAB_LINE; |
| 1263 | if it is on the window's header line, return ON_HEADER_LINE; | ||
| 1253 | if it is in left or right fringe of the window, | 1264 | if it is in left or right fringe of the window, |
| 1254 | return ON_LEFT_FRINGE or ON_RIGHT_FRINGE; | 1265 | return ON_LEFT_FRINGE or ON_RIGHT_FRINGE; |
| 1255 | if it is in the marginal area to the left/right of the window, | 1266 | if it is in the marginal area to the left/right of the window, |
| @@ -1299,15 +1310,19 @@ coordinates_in_window (register struct window *w, int x, int y) | |||
| 1299 | - CURRENT_MODE_LINE_HEIGHT (w) | 1310 | - CURRENT_MODE_LINE_HEIGHT (w) |
| 1300 | - WINDOW_BOTTOM_DIVIDER_WIDTH (w)))) | 1311 | - WINDOW_BOTTOM_DIVIDER_WIDTH (w)))) |
| 1301 | return ON_HORIZONTAL_SCROLL_BAR; | 1312 | return ON_HORIZONTAL_SCROLL_BAR; |
| 1302 | /* On the mode or header line? */ | 1313 | /* On the mode or header/tab line? */ |
| 1303 | else if ((window_wants_mode_line (w) | 1314 | else if ((window_wants_mode_line (w) |
| 1304 | && y >= (bottom_y | 1315 | && y >= (bottom_y |
| 1305 | - CURRENT_MODE_LINE_HEIGHT (w) | 1316 | - CURRENT_MODE_LINE_HEIGHT (w) |
| 1306 | - WINDOW_BOTTOM_DIVIDER_WIDTH (w)) | 1317 | - WINDOW_BOTTOM_DIVIDER_WIDTH (w)) |
| 1307 | && y <= bottom_y - WINDOW_BOTTOM_DIVIDER_WIDTH (w) | 1318 | && y <= bottom_y - WINDOW_BOTTOM_DIVIDER_WIDTH (w) |
| 1308 | && (part = ON_MODE_LINE)) | 1319 | && (part = ON_MODE_LINE)) |
| 1320 | || (window_wants_tab_line (w) | ||
| 1321 | && y < top_y + CURRENT_TAB_LINE_HEIGHT (w) | ||
| 1322 | && (part = ON_TAB_LINE)) | ||
| 1309 | || (window_wants_header_line (w) | 1323 | || (window_wants_header_line (w) |
| 1310 | && y < top_y + CURRENT_HEADER_LINE_HEIGHT (w) | 1324 | && y < top_y + CURRENT_TAB_LINE_HEIGHT (w) |
| 1325 | + CURRENT_HEADER_LINE_HEIGHT (w) | ||
| 1311 | && (part = ON_HEADER_LINE))) | 1326 | && (part = ON_HEADER_LINE))) |
| 1312 | { | 1327 | { |
| 1313 | /* If it's under/over the scroll bar portion of the mode/header | 1328 | /* If it's under/over the scroll bar portion of the mode/header |
| @@ -1407,6 +1422,7 @@ window_relative_x_coord (struct window *w, enum window_part part, int x) | |||
| 1407 | case ON_TEXT: | 1422 | case ON_TEXT: |
| 1408 | return x - window_box_left (w, TEXT_AREA); | 1423 | return x - window_box_left (w, TEXT_AREA); |
| 1409 | 1424 | ||
| 1425 | case ON_TAB_LINE: | ||
| 1410 | case ON_HEADER_LINE: | 1426 | case ON_HEADER_LINE: |
| 1411 | case ON_MODE_LINE: | 1427 | case ON_MODE_LINE: |
| 1412 | case ON_LEFT_FRINGE: | 1428 | case ON_LEFT_FRINGE: |
| @@ -1457,6 +1473,7 @@ If they are in the bottom divider of WINDOW, `bottom-divider' is returned. | |||
| 1457 | If they are in the right divider of WINDOW, `right-divider' is returned. | 1473 | If they are in the right divider of WINDOW, `right-divider' is returned. |
| 1458 | If they are in the mode line of WINDOW, `mode-line' is returned. | 1474 | If they are in the mode line of WINDOW, `mode-line' is returned. |
| 1459 | If they are in the header line of WINDOW, `header-line' is returned. | 1475 | If they are in the header line of WINDOW, `header-line' is returned. |
| 1476 | If they are in the tab line of WINDOW, `tab-line' is returned. | ||
| 1460 | If they are in the left fringe of WINDOW, `left-fringe' is returned. | 1477 | If they are in the left fringe of WINDOW, `left-fringe' is returned. |
| 1461 | If they are in the right fringe of WINDOW, `right-fringe' is returned. | 1478 | If they are in the right fringe of WINDOW, `right-fringe' is returned. |
| 1462 | If they are on the border between WINDOW and its right sibling, | 1479 | If they are on the border between WINDOW and its right sibling, |
| @@ -1502,6 +1519,9 @@ If they are in the windows's left or right marginal areas, `left-margin'\n\ | |||
| 1502 | case ON_HEADER_LINE: | 1519 | case ON_HEADER_LINE: |
| 1503 | return Qheader_line; | 1520 | return Qheader_line; |
| 1504 | 1521 | ||
| 1522 | case ON_TAB_LINE: | ||
| 1523 | return Qtab_line; | ||
| 1524 | |||
| 1505 | case ON_LEFT_FRINGE: | 1525 | case ON_LEFT_FRINGE: |
| 1506 | return Qleft_fringe; | 1526 | return Qleft_fringe; |
| 1507 | 1527 | ||
| @@ -1585,7 +1605,7 @@ check_window_containing (struct window *w, void *user_data) | |||
| 1585 | 1605 | ||
| 1586 | Lisp_Object | 1606 | Lisp_Object |
| 1587 | window_from_coordinates (struct frame *f, int x, int y, | 1607 | window_from_coordinates (struct frame *f, int x, int y, |
| 1588 | enum window_part *part, bool tool_bar_p) | 1608 | enum window_part *part, bool tab_bar_p, bool tool_bar_p) |
| 1589 | { | 1609 | { |
| 1590 | Lisp_Object window; | 1610 | Lisp_Object window; |
| 1591 | struct check_window_data cw; | 1611 | struct check_window_data cw; |
| @@ -1598,6 +1618,21 @@ window_from_coordinates (struct frame *f, int x, int y, | |||
| 1598 | cw.window = &window, cw.x = x, cw.y = y; cw.part = part; | 1618 | cw.window = &window, cw.x = x, cw.y = y; cw.part = part; |
| 1599 | foreach_window (f, check_window_containing, &cw); | 1619 | foreach_window (f, check_window_containing, &cw); |
| 1600 | 1620 | ||
| 1621 | #if defined (HAVE_WINDOW_SYSTEM) | ||
| 1622 | /* If not found above, see if it's in the tab bar window, if a tab | ||
| 1623 | bar exists. */ | ||
| 1624 | if (NILP (window) | ||
| 1625 | && tab_bar_p | ||
| 1626 | && WINDOWP (f->tab_bar_window) | ||
| 1627 | && WINDOW_TOTAL_LINES (XWINDOW (f->tab_bar_window)) > 0 | ||
| 1628 | && (coordinates_in_window (XWINDOW (f->tab_bar_window), x, y) | ||
| 1629 | != ON_NOTHING)) | ||
| 1630 | { | ||
| 1631 | *part = ON_TEXT; | ||
| 1632 | window = f->tab_bar_window; | ||
| 1633 | } | ||
| 1634 | #endif | ||
| 1635 | |||
| 1601 | #if defined (HAVE_WINDOW_SYSTEM) && ! defined (HAVE_EXT_TOOL_BAR) | 1636 | #if defined (HAVE_WINDOW_SYSTEM) && ! defined (HAVE_EXT_TOOL_BAR) |
| 1602 | /* If not found above, see if it's in the tool bar window, if a tool | 1637 | /* If not found above, see if it's in the tool bar window, if a tool |
| 1603 | bar exists. */ | 1638 | bar exists. */ |
| @@ -1633,7 +1668,7 @@ column 0. */) | |||
| 1633 | + FRAME_INTERNAL_BORDER_WIDTH (f)), | 1668 | + FRAME_INTERNAL_BORDER_WIDTH (f)), |
| 1634 | (FRAME_PIXEL_Y_FROM_CANON_Y (f, y) | 1669 | (FRAME_PIXEL_Y_FROM_CANON_Y (f, y) |
| 1635 | + FRAME_INTERNAL_BORDER_WIDTH (f)), | 1670 | + FRAME_INTERNAL_BORDER_WIDTH (f)), |
| 1636 | 0, false); | 1671 | 0, false, false); |
| 1637 | } | 1672 | } |
| 1638 | 1673 | ||
| 1639 | DEFUN ("window-point", Fwindow_point, Swindow_point, 0, 1, 0, | 1674 | DEFUN ("window-point", Fwindow_point, Swindow_point, 0, 1, 0, |
| @@ -1945,6 +1980,14 @@ Return nil if window display is not up-to-date. In that case, use | |||
| 1945 | goto found_row; | 1980 | goto found_row; |
| 1946 | } | 1981 | } |
| 1947 | 1982 | ||
| 1983 | if (EQ (line, Qtab_line)) | ||
| 1984 | { | ||
| 1985 | if (!window_wants_tab_line (w)) | ||
| 1986 | return Qnil; | ||
| 1987 | row = MATRIX_TAB_LINE_ROW (w->current_matrix); | ||
| 1988 | return row->enabled_p ? list4i (row->height, 0, 0, 0) : Qnil; | ||
| 1989 | } | ||
| 1990 | |||
| 1948 | if (EQ (line, Qheader_line)) | 1991 | if (EQ (line, Qheader_line)) |
| 1949 | { | 1992 | { |
| 1950 | if (!window_wants_header_line (w)) | 1993 | if (!window_wants_header_line (w)) |
| @@ -1959,7 +2002,8 @@ Return nil if window display is not up-to-date. In that case, use | |||
| 1959 | return (row->enabled_p ? | 2002 | return (row->enabled_p ? |
| 1960 | list4i (row->height, | 2003 | list4i (row->height, |
| 1961 | 0, /* not accurate */ | 2004 | 0, /* not accurate */ |
| 1962 | (WINDOW_HEADER_LINE_HEIGHT (w) | 2005 | (WINDOW_TAB_LINE_HEIGHT (w) |
| 2006 | + WINDOW_HEADER_LINE_HEIGHT (w) | ||
| 1963 | + window_text_bottom_y (w)), | 2007 | + window_text_bottom_y (w)), |
| 1964 | 0) | 2008 | 0) |
| 1965 | : Qnil); | 2009 | : Qnil); |
| @@ -2045,8 +2089,9 @@ though when run from an idle timer with a delay of zero seconds. */) | |||
| 2045 | int max_y = NILP (body) ? WINDOW_PIXEL_HEIGHT (w) : window_text_bottom_y (w); | 2089 | int max_y = NILP (body) ? WINDOW_PIXEL_HEIGHT (w) : window_text_bottom_y (w); |
| 2046 | Lisp_Object rows = Qnil; | 2090 | Lisp_Object rows = Qnil; |
| 2047 | int window_width = NILP (body) ? w->pixel_width : window_body_width (w, true); | 2091 | int window_width = NILP (body) ? w->pixel_width : window_body_width (w, true); |
| 2092 | int tab_line_height = WINDOW_TAB_LINE_HEIGHT (w); | ||
| 2048 | int header_line_height = WINDOW_HEADER_LINE_HEIGHT (w); | 2093 | int header_line_height = WINDOW_HEADER_LINE_HEIGHT (w); |
| 2049 | int subtract = NILP (body) ? 0 : header_line_height; | 2094 | int subtract = NILP (body) ? 0 : (tab_line_height + header_line_height); |
| 2050 | bool invert = !NILP (inverse); | 2095 | bool invert = !NILP (inverse); |
| 2051 | bool left_flag = !NILP (left); | 2096 | bool left_flag = !NILP (left); |
| 2052 | 2097 | ||
| @@ -4246,7 +4291,7 @@ make_window (void) | |||
| 4246 | non-Lisp data, so do it only for slots which should not be zero. */ | 4291 | non-Lisp data, so do it only for slots which should not be zero. */ |
| 4247 | w->nrows_scale_factor = w->ncols_scale_factor = 1; | 4292 | w->nrows_scale_factor = w->ncols_scale_factor = 1; |
| 4248 | w->left_fringe_width = w->right_fringe_width = -1; | 4293 | w->left_fringe_width = w->right_fringe_width = -1; |
| 4249 | w->mode_line_height = w->header_line_height = -1; | 4294 | w->mode_line_height = w->tab_line_height = w->header_line_height = -1; |
| 4250 | #ifdef HAVE_WINDOW_SYSTEM | 4295 | #ifdef HAVE_WINDOW_SYSTEM |
| 4251 | w->phys_cursor_type = NO_CURSOR; | 4296 | w->phys_cursor_type = NO_CURSOR; |
| 4252 | w->phys_cursor_width = -1; | 4297 | w->phys_cursor_width = -1; |
| @@ -4772,7 +4817,7 @@ Third argument SIDE nil (or `below') specifies that the new window shall | |||
| 4772 | be located below WINDOW. SIDE `above' means the new window shall be | 4817 | be located below WINDOW. SIDE `above' means the new window shall be |
| 4773 | located above WINDOW. In both cases PIXEL-SIZE specifies the pixel | 4818 | located above WINDOW. In both cases PIXEL-SIZE specifies the pixel |
| 4774 | height of the new window including space reserved for the mode and/or | 4819 | height of the new window including space reserved for the mode and/or |
| 4775 | header line. | 4820 | header/tab line. |
| 4776 | 4821 | ||
| 4777 | SIDE t (or `right') specifies that the new window shall be located on | 4822 | SIDE t (or `right') specifies that the new window shall be located on |
| 4778 | the right side of WINDOW. SIDE `left' means the new window shall be | 4823 | the right side of WINDOW. SIDE `left' means the new window shall be |
| @@ -5350,6 +5395,41 @@ window_wants_header_line (struct window *w) | |||
| 5350 | : 0); | 5395 | : 0); |
| 5351 | } | 5396 | } |
| 5352 | 5397 | ||
| 5398 | |||
| 5399 | /** | ||
| 5400 | * window_wants_tab_line: | ||
| 5401 | * | ||
| 5402 | * Return 1 if window W wants a tab line and is high enough to | ||
| 5403 | * accommodate it, 0 otherwise. | ||
| 5404 | * | ||
| 5405 | * W wants a tab line if it's a leaf window and neither a minibuffer | ||
| 5406 | * nor a pseudo window. Moreover, its 'window-mode-line-format' | ||
| 5407 | * parameter must not be 'none' and either that parameter or W's | ||
| 5408 | * buffer's 'mode-line-format' value must be non-nil. Finally, W must | ||
| 5409 | * be higher than its frame's canonical character height and be able | ||
| 5410 | * to accommodate a mode line and a header line too if necessary (the | ||
| 5411 | * mode line and a header line prevail). | ||
| 5412 | */ | ||
| 5413 | bool | ||
| 5414 | window_wants_tab_line (struct window *w) | ||
| 5415 | { | ||
| 5416 | Lisp_Object window_tab_line_format = | ||
| 5417 | window_parameter (w, Qtab_line_format); | ||
| 5418 | |||
| 5419 | return ((WINDOW_LEAF_P (w) | ||
| 5420 | && !MINI_WINDOW_P (w) | ||
| 5421 | && !WINDOW_PSEUDO_P (w) | ||
| 5422 | && !EQ (window_tab_line_format, Qnone) | ||
| 5423 | && (!NILP (window_tab_line_format) | ||
| 5424 | || !NILP (BVAR (XBUFFER (WINDOW_BUFFER (w)), tab_line_format))) | ||
| 5425 | && (WINDOW_PIXEL_HEIGHT (w) | ||
| 5426 | > (((window_wants_mode_line (w) ? 1 : 0) | ||
| 5427 | + (window_wants_header_line (w) ? 1 : 0) | ||
| 5428 | + 1) * WINDOW_FRAME_LINE_HEIGHT (w)))) | ||
| 5429 | ? 1 | ||
| 5430 | : 0); | ||
| 5431 | } | ||
| 5432 | |||
| 5353 | /* Return number of lines of text in window W, not counting the mode | 5433 | /* Return number of lines of text in window W, not counting the mode |
| 5354 | line and header line, if any. Do NOT use this for windows on GUI | 5434 | line and header line, if any. Do NOT use this for windows on GUI |
| 5355 | frames; use window_body_height instead. This function is only for | 5435 | frames; use window_body_height instead. This function is only for |
| @@ -5366,6 +5446,9 @@ window_internal_height (struct window *w) | |||
| 5366 | if (window_wants_header_line (w)) | 5446 | if (window_wants_header_line (w)) |
| 5367 | --ht; | 5447 | --ht; |
| 5368 | 5448 | ||
| 5449 | if (window_wants_tab_line (w)) | ||
| 5450 | --ht; | ||
| 5451 | |||
| 5369 | return ht; | 5452 | return ht; |
| 5370 | } | 5453 | } |
| 5371 | 5454 | ||
| @@ -5726,8 +5809,9 @@ window_scroll_pixel_based (Lisp_Object window, int n, bool whole, bool noerror) | |||
| 5726 | move_it_to (&it, PT, -1, -1, -1, MOVE_TO_POS); | 5809 | move_it_to (&it, PT, -1, -1, -1, MOVE_TO_POS); |
| 5727 | if (IT_CHARPOS (it) == PT | 5810 | if (IT_CHARPOS (it) == PT |
| 5728 | && it.current_y >= this_scroll_margin | 5811 | && it.current_y >= this_scroll_margin |
| 5729 | && it.current_y <= last_y - WINDOW_HEADER_LINE_HEIGHT (w) | 5812 | && it.current_y <= last_y - WINDOW_TAB_LINE_HEIGHT (w) |
| 5730 | && (NILP (Vscroll_preserve_screen_position) | 5813 | - WINDOW_HEADER_LINE_HEIGHT (w) |
| 5814 | && (NILP (Vscroll_preserve_screen_position) | ||
| 5731 | || EQ (Vscroll_preserve_screen_position, Qt))) | 5815 | || EQ (Vscroll_preserve_screen_position, Qt))) |
| 5732 | /* We found PT at a legitimate height. Leave it alone. */ | 5816 | /* We found PT at a legitimate height. Leave it alone. */ |
| 5733 | ; | 5817 | ; |
| @@ -5742,7 +5826,8 @@ window_scroll_pixel_based (Lisp_Object window, int n, bool whole, bool noerror) | |||
| 5742 | is necessary because we set it.current_y to 0, above. */ | 5826 | is necessary because we set it.current_y to 0, above. */ |
| 5743 | move_it_to (&it, -1, | 5827 | move_it_to (&it, -1, |
| 5744 | window_scroll_pixel_based_preserve_x, | 5828 | window_scroll_pixel_based_preserve_x, |
| 5745 | goal_y - WINDOW_HEADER_LINE_HEIGHT (w), | 5829 | goal_y - WINDOW_TAB_LINE_HEIGHT (w) |
| 5830 | - WINDOW_HEADER_LINE_HEIGHT (w), | ||
| 5746 | -1, MOVE_TO_Y | MOVE_TO_X); | 5831 | -1, MOVE_TO_Y | MOVE_TO_X); |
| 5747 | } | 5832 | } |
| 5748 | 5833 | ||
| @@ -5778,8 +5863,9 @@ window_scroll_pixel_based (Lisp_Object window, int n, bool whole, bool noerror) | |||
| 5778 | /* We subtract WINDOW_HEADER_LINE_HEIGHT because | 5863 | /* We subtract WINDOW_HEADER_LINE_HEIGHT because |
| 5779 | it.y is relative to the bottom of the header | 5864 | it.y is relative to the bottom of the header |
| 5780 | line, see above. */ | 5865 | line, see above. */ |
| 5781 | (it.last_visible_y - WINDOW_HEADER_LINE_HEIGHT (w) | 5866 | (it.last_visible_y - WINDOW_TAB_LINE_HEIGHT (w) |
| 5782 | - partial_line_height (&it) - this_scroll_margin - 1), | 5867 | - WINDOW_HEADER_LINE_HEIGHT (w) |
| 5868 | - partial_line_height (&it) - this_scroll_margin - 1), | ||
| 5783 | -1, | 5869 | -1, |
| 5784 | MOVE_TO_POS | MOVE_TO_Y); | 5870 | MOVE_TO_POS | MOVE_TO_Y); |
| 5785 | 5871 | ||
| @@ -5817,13 +5903,15 @@ window_scroll_pixel_based (Lisp_Object window, int n, bool whole, bool noerror) | |||
| 5817 | if (it.what == IT_EOB) | 5903 | if (it.what == IT_EOB) |
| 5818 | partial_p = | 5904 | partial_p = |
| 5819 | it.current_y + it.ascent + it.descent | 5905 | it.current_y + it.ascent + it.descent |
| 5820 | > it.last_visible_y - this_scroll_margin - WINDOW_HEADER_LINE_HEIGHT (w); | 5906 | > it.last_visible_y - this_scroll_margin |
| 5907 | - WINDOW_TAB_LINE_HEIGHT (w) - WINDOW_HEADER_LINE_HEIGHT (w); | ||
| 5821 | else | 5908 | else |
| 5822 | { | 5909 | { |
| 5823 | move_it_by_lines (&it, 1); | 5910 | move_it_by_lines (&it, 1); |
| 5824 | partial_p = | 5911 | partial_p = |
| 5825 | it.current_y | 5912 | it.current_y |
| 5826 | > it.last_visible_y - this_scroll_margin - WINDOW_HEADER_LINE_HEIGHT (w); | 5913 | > it.last_visible_y - this_scroll_margin |
| 5914 | - WINDOW_TAB_LINE_HEIGHT (w) - WINDOW_HEADER_LINE_HEIGHT (w); | ||
| 5827 | } | 5915 | } |
| 5828 | 5916 | ||
| 5829 | if (charpos == PT && !partial_p | 5917 | if (charpos == PT && !partial_p |
| @@ -6370,6 +6458,9 @@ and redisplay normally--don't erase and redraw the frame. */) | |||
| 6370 | /* Invalidate pixel data calculated for all compositions. */ | 6458 | /* Invalidate pixel data calculated for all compositions. */ |
| 6371 | for (i = 0; i < n_compositions; i++) | 6459 | for (i = 0; i < n_compositions; i++) |
| 6372 | composition_table[i]->font = NULL; | 6460 | composition_table[i]->font = NULL; |
| 6461 | #if defined (HAVE_WINDOW_SYSTEM) | ||
| 6462 | WINDOW_XFRAME (w)->minimize_tab_bar_window_p = 1; | ||
| 6463 | #endif | ||
| 6373 | #if defined (HAVE_WINDOW_SYSTEM) && ! defined (HAVE_EXT_TOOL_BAR) | 6464 | #if defined (HAVE_WINDOW_SYSTEM) && ! defined (HAVE_EXT_TOOL_BAR) |
| 6374 | WINDOW_XFRAME (w)->minimize_tool_bar_window_p = 1; | 6465 | WINDOW_XFRAME (w)->minimize_tool_bar_window_p = 1; |
| 6375 | #endif | 6466 | #endif |
| @@ -6686,13 +6777,13 @@ struct save_window_data | |||
| 6686 | 6777 | ||
| 6687 | /* We should be able to do without the following two. */ | 6778 | /* We should be able to do without the following two. */ |
| 6688 | int frame_cols, frame_lines; | 6779 | int frame_cols, frame_lines; |
| 6689 | /* These two should get eventually replaced by their pixel | 6780 | /* These three should get eventually replaced by their pixel |
| 6690 | counterparts. */ | 6781 | counterparts. */ |
| 6691 | int frame_menu_bar_lines, frame_tool_bar_lines; | 6782 | int frame_menu_bar_lines, frame_tab_bar_lines, frame_tool_bar_lines; |
| 6692 | int frame_text_width, frame_text_height; | 6783 | int frame_text_width, frame_text_height; |
| 6693 | /* These are currently unused. We need them as soon as we convert | 6784 | /* These are currently unused. We need them as soon as we convert |
| 6694 | to pixels. */ | 6785 | to pixels. */ |
| 6695 | int frame_menu_bar_height, frame_tool_bar_height; | 6786 | int frame_menu_bar_height, frame_tab_bar_height, frame_tool_bar_height; |
| 6696 | } GCALIGNED_STRUCT; | 6787 | } GCALIGNED_STRUCT; |
| 6697 | 6788 | ||
| 6698 | /* This is saved as a Lisp_Vector. */ | 6789 | /* This is saved as a Lisp_Vector. */ |
| @@ -7370,10 +7461,12 @@ saved by this function. */) | |||
| 7370 | data->frame_cols = FRAME_COLS (f); | 7461 | data->frame_cols = FRAME_COLS (f); |
| 7371 | data->frame_lines = FRAME_LINES (f); | 7462 | data->frame_lines = FRAME_LINES (f); |
| 7372 | data->frame_menu_bar_lines = FRAME_MENU_BAR_LINES (f); | 7463 | data->frame_menu_bar_lines = FRAME_MENU_BAR_LINES (f); |
| 7464 | data->frame_tab_bar_lines = FRAME_TAB_BAR_LINES (f); | ||
| 7373 | data->frame_tool_bar_lines = FRAME_TOOL_BAR_LINES (f); | 7465 | data->frame_tool_bar_lines = FRAME_TOOL_BAR_LINES (f); |
| 7374 | data->frame_text_width = FRAME_TEXT_WIDTH (f); | 7466 | data->frame_text_width = FRAME_TEXT_WIDTH (f); |
| 7375 | data->frame_text_height = FRAME_TEXT_HEIGHT (f); | 7467 | data->frame_text_height = FRAME_TEXT_HEIGHT (f); |
| 7376 | data->frame_menu_bar_height = FRAME_MENU_BAR_HEIGHT (f); | 7468 | data->frame_menu_bar_height = FRAME_MENU_BAR_HEIGHT (f); |
| 7469 | data->frame_tab_bar_height = FRAME_TAB_BAR_HEIGHT (f); | ||
| 7377 | data->frame_tool_bar_height = FRAME_TOOL_BAR_HEIGHT (f); | 7470 | data->frame_tool_bar_height = FRAME_TOOL_BAR_HEIGHT (f); |
| 7378 | data->selected_frame = selected_frame; | 7471 | data->selected_frame = selected_frame; |
| 7379 | data->current_window = FRAME_SELECTED_WINDOW (f); | 7472 | data->current_window = FRAME_SELECTED_WINDOW (f); |
| @@ -7663,6 +7756,7 @@ set_window_scroll_bars (struct window *w, Lisp_Object width, | |||
| 7663 | 7756 | ||
| 7664 | /* Don't change anything if new scroll bar won't fit. */ | 7757 | /* Don't change anything if new scroll bar won't fit. */ |
| 7665 | if ((WINDOW_PIXEL_HEIGHT (w) | 7758 | if ((WINDOW_PIXEL_HEIGHT (w) |
| 7759 | - WINDOW_TAB_LINE_HEIGHT (w) | ||
| 7666 | - WINDOW_HEADER_LINE_HEIGHT (w) | 7760 | - WINDOW_HEADER_LINE_HEIGHT (w) |
| 7667 | - WINDOW_MODE_LINE_HEIGHT (w) | 7761 | - WINDOW_MODE_LINE_HEIGHT (w) |
| 7668 | - (new_height == -1 ? FRAME_SCROLL_BAR_AREA_HEIGHT (f) : new_height)) | 7762 | - (new_height == -1 ? FRAME_SCROLL_BAR_AREA_HEIGHT (f) : new_height)) |
| @@ -8086,6 +8180,7 @@ syms_of_window (void) | |||
| 8086 | DEFSYM (Qmark_for_redisplay, "mark-for-redisplay"); | 8180 | DEFSYM (Qmark_for_redisplay, "mark-for-redisplay"); |
| 8087 | DEFSYM (Qmode_line_format, "mode-line-format"); | 8181 | DEFSYM (Qmode_line_format, "mode-line-format"); |
| 8088 | DEFSYM (Qheader_line_format, "header-line-format"); | 8182 | DEFSYM (Qheader_line_format, "header-line-format"); |
| 8183 | DEFSYM (Qtab_line_format, "tab-line-format"); | ||
| 8089 | 8184 | ||
| 8090 | DEFVAR_LISP ("temp-buffer-show-function", Vtemp_buffer_show_function, | 8185 | DEFVAR_LISP ("temp-buffer-show-function", Vtemp_buffer_show_function, |
| 8091 | doc: /* Non-nil means call as function to display a help buffer. | 8186 | doc: /* Non-nil means call as function to display a help buffer. |
| @@ -8389,6 +8484,7 @@ displayed after a scrolling operation to be somewhat inaccurate. */); | |||
| 8389 | defsubr (&Sset_window_redisplay_end_trigger); | 8484 | defsubr (&Sset_window_redisplay_end_trigger); |
| 8390 | defsubr (&Swindow_mode_line_height); | 8485 | defsubr (&Swindow_mode_line_height); |
| 8391 | defsubr (&Swindow_header_line_height); | 8486 | defsubr (&Swindow_header_line_height); |
| 8487 | defsubr (&Swindow_tab_line_height); | ||
| 8392 | defsubr (&Swindow_right_divider_width); | 8488 | defsubr (&Swindow_right_divider_width); |
| 8393 | defsubr (&Swindow_bottom_divider_width); | 8489 | defsubr (&Swindow_bottom_divider_width); |
| 8394 | defsubr (&Swindow_scroll_bar_width); | 8490 | defsubr (&Swindow_scroll_bar_width); |