aboutsummaryrefslogtreecommitdiffstats
path: root/src/xdisp.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/xdisp.c')
-rw-r--r--src/xdisp.c52
1 files changed, 29 insertions, 23 deletions
diff --git a/src/xdisp.c b/src/xdisp.c
index 0e18c5adbc6..28ef741f074 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -1809,7 +1809,7 @@ pos_visible_p (struct window *w, ptrdiff_t charpos, int *x, int *y,
1809 *rowh = max (0, (min (it2.current_y + it2.max_ascent + it2.max_descent, 1809 *rowh = max (0, (min (it2.current_y + it2.max_ascent + it2.max_descent,
1810 it.last_visible_y) 1810 it.last_visible_y)
1811 - max (max (it2.current_y, 1811 - max (max (it2.current_y,
1812 WINDOW_TAB_LINE_HEIGHT (w)), 1812 WINDOW_TAB_LINE_HEIGHT (w)),
1813 WINDOW_HEADER_LINE_HEIGHT (w)))); 1813 WINDOW_HEADER_LINE_HEIGHT (w))));
1814 *vpos = it2.vpos; 1814 *vpos = it2.vpos;
1815 if (it2.bidi_it.paragraph_dir == R2L) 1815 if (it2.bidi_it.paragraph_dir == R2L)
@@ -2532,8 +2532,8 @@ remember_mouse_glyph (struct frame *f, int gx, int gy, NativeRectangle *rect)
2532 gr = (part == ON_TAB_LINE 2532 gr = (part == ON_TAB_LINE
2533 ? MATRIX_TAB_LINE_ROW (w->current_matrix) 2533 ? MATRIX_TAB_LINE_ROW (w->current_matrix)
2534 : (part == ON_HEADER_LINE 2534 : (part == ON_HEADER_LINE
2535 ? MATRIX_HEADER_LINE_ROW (w->current_matrix) 2535 ? MATRIX_HEADER_LINE_ROW (w->current_matrix)
2536 : MATRIX_MODE_LINE_ROW (w->current_matrix))); 2536 : MATRIX_MODE_LINE_ROW (w->current_matrix)));
2537 gy = gr->y; 2537 gy = gr->y;
2538 area = TEXT_AREA; 2538 area = TEXT_AREA;
2539 goto text_glyph_row_found; 2539 goto text_glyph_row_found;
@@ -2579,7 +2579,8 @@ remember_mouse_glyph (struct frame *f, int gx, int gy, NativeRectangle *rect)
2579 gx += (x / width) * width; 2579 gx += (x / width) * width;
2580 } 2580 }
2581 2581
2582 if (part != ON_MODE_LINE && part != ON_HEADER_LINE && part != ON_TAB_LINE) 2582 if (part != ON_MODE_LINE && part != ON_HEADER_LINE
2583 && part != ON_TAB_LINE)
2583 { 2584 {
2584 gx += window_box_left_offset (w, area); 2585 gx += window_box_left_offset (w, area);
2585 /* Don't expand over the modeline to make sure the vertical 2586 /* Don't expand over the modeline to make sure the vertical
@@ -2594,7 +2595,8 @@ remember_mouse_glyph (struct frame *f, int gx, int gy, NativeRectangle *rect)
2594 gx = (x / width) * width; 2595 gx = (x / width) * width;
2595 y -= gy; 2596 y -= gy;
2596 gy += (y / height) * height; 2597 gy += (y / height) * height;
2597 if (part != ON_MODE_LINE && part != ON_HEADER_LINE && part != ON_TAB_LINE) 2598 if (part != ON_MODE_LINE && part != ON_HEADER_LINE
2599 && part != ON_TAB_LINE)
2598 /* See comment above. */ 2600 /* See comment above. */
2599 height = min (height, 2601 height = min (height,
2600 max (0, WINDOW_BOX_HEIGHT_NO_MODE_LINE (w) - gy)); 2602 max (0, WINDOW_BOX_HEIGHT_NO_MODE_LINE (w) - gy));
@@ -12688,7 +12690,9 @@ display_tab_bar (struct window *w)
12688 12690
12689#if defined (USE_X_TOOLKIT) || defined (USE_GTK) 12691#if defined (USE_X_TOOLKIT) || defined (USE_GTK)
12690 eassert (!FRAME_WINDOW_P (f)); 12692 eassert (!FRAME_WINDOW_P (f));
12691 init_iterator (&it, w, -1, -1, f->desired_matrix->rows + (FRAME_MENU_BAR_LINES (f) > 0 ? 1 : 0), TAB_BAR_FACE_ID); 12693 init_iterator (&it, w, -1, -1, f->desired_matrix->rows
12694 + (FRAME_MENU_BAR_LINES (f) > 0 ? 1 : 0),
12695 TAB_BAR_FACE_ID);
12692 it.first_visible_x = 0; 12696 it.first_visible_x = 0;
12693 it.last_visible_x = FRAME_PIXEL_WIDTH (f); 12697 it.last_visible_x = FRAME_PIXEL_WIDTH (f);
12694#elif defined (HAVE_X_WINDOWS) /* X without toolkit. */ 12698#elif defined (HAVE_X_WINDOWS) /* X without toolkit. */
@@ -12708,7 +12712,8 @@ display_tab_bar (struct window *w)
12708 { 12712 {
12709 /* This is a TTY frame, i.e. character hpos/vpos are used as 12713 /* This is a TTY frame, i.e. character hpos/vpos are used as
12710 pixel x/y. */ 12714 pixel x/y. */
12711 init_iterator (&it, w, -1, -1, f->desired_matrix->rows + (FRAME_MENU_BAR_LINES (f) > 0 ? 1 : 0), 12715 init_iterator (&it, w, -1, -1, f->desired_matrix->rows
12716 + (FRAME_MENU_BAR_LINES (f) > 0 ? 1 : 0),
12712 TAB_BAR_FACE_ID); 12717 TAB_BAR_FACE_ID);
12713 it.first_visible_x = 0; 12718 it.first_visible_x = 0;
12714 it.last_visible_x = FRAME_COLS (f); 12719 it.last_visible_x = FRAME_COLS (f);
@@ -17164,7 +17169,8 @@ compute_window_start_on_continuation_line (struct window *w)
17164 17169
17165 /* Find the start of the continued line. This should be fast 17170 /* Find the start of the continued line. This should be fast
17166 because find_newline is fast (newline cache). */ 17171 because find_newline is fast (newline cache). */
17167 row = w->desired_matrix->rows + window_wants_tab_line (w) + window_wants_header_line (w); 17172 row = w->desired_matrix->rows + window_wants_tab_line (w)
17173 + window_wants_header_line (w);
17168 init_iterator (&it, w, CHARPOS (start_pos), BYTEPOS (start_pos), 17174 init_iterator (&it, w, CHARPOS (start_pos), BYTEPOS (start_pos),
17169 row, DEFAULT_FACE_ID); 17175 row, DEFAULT_FACE_ID);
17170 reseat_at_previous_visible_line_start (&it); 17176 reseat_at_previous_visible_line_start (&it);
@@ -18677,7 +18683,7 @@ redisplay_window (Lisp_Object window, bool just_this_one_p)
18677 /* This means that the window has a mode line. */ 18683 /* This means that the window has a mode line. */
18678 && (window_wants_mode_line (w) 18684 && (window_wants_mode_line (w)
18679 || window_wants_header_line (w) 18685 || window_wants_header_line (w)
18680 || window_wants_tab_line (w))) 18686 || window_wants_tab_line (w)))
18681 { 18687 {
18682 18688
18683 display_mode_lines (w); 18689 display_mode_lines (w);
@@ -20822,7 +20828,8 @@ do nothing. */)
20822 EMACS_INT vpos; 20828 EMACS_INT vpos;
20823 20829
20824 if (NILP (row)) 20830 if (NILP (row))
20825 vpos = WINDOWP (sf->tab_bar_window) ? 0 : FRAME_MENU_BAR_LINES (sf) > 0 ? 1 : 0; 20831 vpos = WINDOWP (sf->tab_bar_window) ? 0 :
20832 FRAME_MENU_BAR_LINES (sf) > 0 ? 1 : 0;
20826 else 20833 else
20827 { 20834 {
20828 CHECK_FIXNUM (row); 20835 CHECK_FIXNUM (row);
@@ -32350,8 +32357,8 @@ note_mode_line_or_margin_highlight (Lisp_Object window, int x, int y,
32350 row = (area == ON_MODE_LINE 32357 row = (area == ON_MODE_LINE
32351 ? MATRIX_MODE_LINE_ROW (w->current_matrix) 32358 ? MATRIX_MODE_LINE_ROW (w->current_matrix)
32352 : (area == ON_TAB_LINE 32359 : (area == ON_TAB_LINE
32353 ? MATRIX_TAB_LINE_ROW (w->current_matrix) 32360 ? MATRIX_TAB_LINE_ROW (w->current_matrix)
32354 : MATRIX_HEADER_LINE_ROW (w->current_matrix))); 32361 : MATRIX_HEADER_LINE_ROW (w->current_matrix)));
32355 32362
32356 /* Find the glyph under the mouse pointer. */ 32363 /* Find the glyph under the mouse pointer. */
32357 if (row->mode_line_p && row->enabled_p) 32364 if (row->mode_line_p && row->enabled_p)
@@ -32466,7 +32473,8 @@ note_mode_line_or_margin_highlight (Lisp_Object window, int x, int y,
32466 32473
32467 /* Change the mouse pointer according to what is under X/Y. */ 32474 /* Change the mouse pointer according to what is under X/Y. */
32468 if (NILP (pointer) 32475 if (NILP (pointer)
32469 && (area == ON_MODE_LINE || area == ON_HEADER_LINE || area == ON_TAB_LINE)) 32476 && (area == ON_MODE_LINE || area == ON_HEADER_LINE
32477 || area == ON_TAB_LINE))
32470 { 32478 {
32471 Lisp_Object map; 32479 Lisp_Object map;
32472 32480
@@ -32492,7 +32500,8 @@ note_mode_line_or_margin_highlight (Lisp_Object window, int x, int y,
32492 { 32500 {
32493 mouse_face = Fget_text_property (pos, Qmouse_face, string); 32501 mouse_face = Fget_text_property (pos, Qmouse_face, string);
32494 if (!NILP (Vmouse_highlight) && !NILP (mouse_face) 32502 if (!NILP (Vmouse_highlight) && !NILP (mouse_face)
32495 && ((area == ON_MODE_LINE) || (area == ON_HEADER_LINE) || (area == ON_TAB_LINE)) 32503 && ((area == ON_MODE_LINE) || (area == ON_HEADER_LINE)
32504 || (area == ON_TAB_LINE))
32496 && glyph) 32505 && glyph)
32497 { 32506 {
32498 Lisp_Object b, e; 32507 Lisp_Object b, e;
@@ -32564,10 +32573,10 @@ note_mode_line_or_margin_highlight (Lisp_Object window, int x, int y,
32564 vpos = (area == ON_MODE_LINE 32573 vpos = (area == ON_MODE_LINE
32565 ? (w->current_matrix)->nrows - 1 32574 ? (w->current_matrix)->nrows - 1
32566 : (area == ON_TAB_LINE 32575 : (area == ON_TAB_LINE
32567 ? 0 32576 ? 0
32568 : (w->current_matrix->tab_line_p 32577 : (w->current_matrix->tab_line_p
32569 ? 1 32578 ? 1
32570 : 0))); 32579 : 0)));
32571 32580
32572 /* If GLYPH's position is included in the region that is 32581 /* If GLYPH's position is included in the region that is
32573 already drawn in mouse face, we have nothing to do. */ 32582 already drawn in mouse face, we have nothing to do. */
@@ -32623,7 +32632,8 @@ note_mode_line_or_margin_highlight (Lisp_Object window, int x, int y,
32623 32632
32624 /* If mouse-face doesn't need to be shown, clear any existing 32633 /* If mouse-face doesn't need to be shown, clear any existing
32625 mouse-face. */ 32634 mouse-face. */
32626 if ((area == ON_MODE_LINE || area == ON_HEADER_LINE || area == ON_TAB_LINE) && !mouse_face_shown) 32635 if ((area == ON_MODE_LINE || area == ON_HEADER_LINE
32636 || area == ON_TAB_LINE) && !mouse_face_shown)
32627 clear_mouse_face (hlinfo); 32637 clear_mouse_face (hlinfo);
32628 32638
32629 define_frame_cursor1 (f, cursor, pointer); 32639 define_frame_cursor1 (f, cursor, pointer);
@@ -34372,10 +34382,6 @@ vertical margin. */);
34372 doc: /* Relief thickness of tab-bar buttons. */); 34382 doc: /* Relief thickness of tab-bar buttons. */);
34373 tab_bar_button_relief = DEFAULT_TAB_BAR_BUTTON_RELIEF; 34383 tab_bar_button_relief = DEFAULT_TAB_BAR_BUTTON_RELIEF;
34374 34384
34375 DEFVAR_INT ("tab-bar-max-label-size", tab_bar_max_label_size,
34376 doc: /* Maximum number of characters a label can have to be shown. */);
34377 tab_bar_max_label_size = DEFAULT_TAB_BAR_LABEL_SIZE;
34378
34379 DEFVAR_LISP ("tool-bar-border", Vtool_bar_border, 34385 DEFVAR_LISP ("tool-bar-border", Vtool_bar_border,
34380 doc: /* Border below tool-bar in pixels. 34386 doc: /* Border below tool-bar in pixels.
34381If an integer, use it as the height of the border. 34387If an integer, use it as the height of the border.