diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/ChangeLog | 15 | ||||
| -rw-r--r-- | src/dispextern.h | 18 | ||||
| -rw-r--r-- | src/dispnew.c | 2 | ||||
| -rw-r--r-- | src/nsterm.m | 11 | ||||
| -rw-r--r-- | src/w32term.c | 12 | ||||
| -rw-r--r-- | src/xdisp.c | 45 | ||||
| -rw-r--r-- | src/xterm.c | 12 |
7 files changed, 68 insertions, 47 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index 37c167393f7..830de80faaa 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,5 +1,20 @@ | |||
| 1 | 2013-08-28 Dmitry Antipov <dmantipov@yandex.ru> | 1 | 2013-08-28 Dmitry Antipov <dmantipov@yandex.ru> |
| 2 | 2 | ||
| 3 | Prefer enum glyph_row_area to int where appropriate. | ||
| 4 | * dispextern.h (enum glyph_row_area): Add ANY_AREA member. | ||
| 5 | Fix comment. | ||
| 6 | (window_box, window_box_width, window_box_left, window_box_left_offset) | ||
| 7 | (window_box_right, window_box_right_offset): Adjust prototypes. | ||
| 8 | * xdisp.c (window_box, window_box_width, window_box_left) | ||
| 9 | (window_box_left_offset, window_box_right, window_box_right_offset): | ||
| 10 | Use enum glyph_row_area. Adjust users and tweak comment where needed. | ||
| 11 | (window_box_edges): Likewise. Lost 2nd arg since it is always ANY_AREA. | ||
| 12 | * nsterm.m (ns_clip_to_row): | ||
| 13 | * w32term.c (w32_clip_to_row): | ||
| 14 | * xterm.c (x_clip_to_row): Likewise. | ||
| 15 | |||
| 16 | 2013-08-28 Dmitry Antipov <dmantipov@yandex.ru> | ||
| 17 | |||
| 3 | * buffer.c (Foverlays_at, Foverlays_in, Fnext_overlay_change) | 18 | * buffer.c (Foverlays_at, Foverlays_in, Fnext_overlay_change) |
| 4 | (Fprevious_overlay_change): Fast path for buffer with no overlays. | 19 | (Fprevious_overlay_change): Fast path for buffer with no overlays. |
| 5 | 20 | ||
diff --git a/src/dispextern.h b/src/dispextern.h index 2d44dca3861..b327250a88a 100644 --- a/src/dispextern.h +++ b/src/dispextern.h | |||
| @@ -751,11 +751,12 @@ void check_matrix_pointer_lossage (struct glyph_matrix *); | |||
| 751 | Glyph Rows | 751 | Glyph Rows |
| 752 | ***********************************************************************/ | 752 | ***********************************************************************/ |
| 753 | 753 | ||
| 754 | /* Area in window glyph matrix. If values are added or removed, the | 754 | /* Area in window glyph matrix. If values are added or removed, |
| 755 | function mark_object in alloc.c has to be changed. */ | 755 | the function mark_glyph_matrix in alloc.c may need to be changed. */ |
| 756 | 756 | ||
| 757 | enum glyph_row_area | 757 | enum glyph_row_area |
| 758 | { | 758 | { |
| 759 | ANY_AREA = -1, | ||
| 759 | LEFT_MARGIN_AREA, | 760 | LEFT_MARGIN_AREA, |
| 760 | TEXT_AREA, | 761 | TEXT_AREA, |
| 761 | RIGHT_MARGIN_AREA, | 762 | RIGHT_MARGIN_AREA, |
| @@ -3163,14 +3164,15 @@ int resize_mini_window (struct window *, int); | |||
| 3163 | void set_vertical_scroll_bar (struct window *); | 3164 | void set_vertical_scroll_bar (struct window *); |
| 3164 | #endif | 3165 | #endif |
| 3165 | int try_window (Lisp_Object, struct text_pos, int); | 3166 | int try_window (Lisp_Object, struct text_pos, int); |
| 3166 | void window_box (struct window *, int, int *, int *, int *, int *); | 3167 | void window_box (struct window *, enum glyph_row_area, |
| 3168 | int *, int *, int *, int *); | ||
| 3167 | int window_box_height (struct window *); | 3169 | int window_box_height (struct window *); |
| 3168 | int window_text_bottom_y (struct window *); | 3170 | int window_text_bottom_y (struct window *); |
| 3169 | int window_box_width (struct window *, int); | 3171 | int window_box_width (struct window *, enum glyph_row_area); |
| 3170 | int window_box_left (struct window *, int); | 3172 | int window_box_left (struct window *, enum glyph_row_area); |
| 3171 | int window_box_left_offset (struct window *, int); | 3173 | int window_box_left_offset (struct window *, enum glyph_row_area); |
| 3172 | int window_box_right (struct window *, int); | 3174 | int window_box_right (struct window *, enum glyph_row_area); |
| 3173 | int window_box_right_offset (struct window *, int); | 3175 | int window_box_right_offset (struct window *, enum glyph_row_area); |
| 3174 | int estimate_mode_line_height (struct frame *, enum face_id); | 3176 | int estimate_mode_line_height (struct frame *, enum face_id); |
| 3175 | void pixel_to_glyph_coords (struct frame *, int, int, int *, int *, | 3177 | void pixel_to_glyph_coords (struct frame *, int, int, int *, int *, |
| 3176 | NativeRectangle *, int); | 3178 | NativeRectangle *, int); |
diff --git a/src/dispnew.c b/src/dispnew.c index 349689e57f5..f2298ffabe4 100644 --- a/src/dispnew.c +++ b/src/dispnew.c | |||
| @@ -413,7 +413,7 @@ adjust_glyph_matrix (struct window *w, struct glyph_matrix *matrix, int x, int y | |||
| 413 | Get W's size. */ | 413 | Get W's size. */ |
| 414 | if (w) | 414 | if (w) |
| 415 | { | 415 | { |
| 416 | window_box (w, -1, 0, 0, &window_width, &window_height); | 416 | window_box (w, ANY_AREA, 0, 0, &window_width, &window_height); |
| 417 | 417 | ||
| 418 | header_line_p = WINDOW_WANTS_HEADER_LINE_P (w); | 418 | header_line_p = WINDOW_WANTS_HEADER_LINE_P (w); |
| 419 | header_line_changed_p = header_line_p != matrix->header_line_p; | 419 | header_line_changed_p = header_line_p != matrix->header_line_p; |
diff --git a/src/nsterm.m b/src/nsterm.m index 921c3a5ce05..750d8b25b4d 100644 --- a/src/nsterm.m +++ b/src/nsterm.m | |||
| @@ -885,7 +885,8 @@ ns_unfocus (struct frame *f) | |||
| 885 | 885 | ||
| 886 | 886 | ||
| 887 | static void | 887 | static void |
| 888 | ns_clip_to_row (struct window *w, struct glyph_row *row, int area, BOOL gc) | 888 | ns_clip_to_row (struct window *w, struct glyph_row *row, |
| 889 | enum glyph_row_area area, BOOL gc) | ||
| 889 | /* -------------------------------------------------------------------------- | 890 | /* -------------------------------------------------------------------------- |
| 890 | Internal (but parallels other terms): Focus drawing on given row | 891 | Internal (but parallels other terms): Focus drawing on given row |
| 891 | -------------------------------------------------------------------------- */ | 892 | -------------------------------------------------------------------------- */ |
| @@ -2044,7 +2045,7 @@ ns_scroll_run (struct window *w, struct run *run) | |||
| 2044 | /* Get frame-relative bounding box of the text display area of W, | 2045 | /* Get frame-relative bounding box of the text display area of W, |
| 2045 | without mode lines. Include in this box the left and right | 2046 | without mode lines. Include in this box the left and right |
| 2046 | fringe of W. */ | 2047 | fringe of W. */ |
| 2047 | window_box (w, -1, &x, &y, &width, &height); | 2048 | window_box (w, ANY_AREA, &x, &y, &width, &height); |
| 2048 | 2049 | ||
| 2049 | from_y = WINDOW_TO_FRAME_PIXEL_Y (w, run->current_y); | 2050 | from_y = WINDOW_TO_FRAME_PIXEL_Y (w, run->current_y); |
| 2050 | to_y = WINDOW_TO_FRAME_PIXEL_Y (w, run->desired_y); | 2051 | to_y = WINDOW_TO_FRAME_PIXEL_Y (w, run->desired_y); |
| @@ -2219,7 +2220,7 @@ ns_draw_fringe_bitmap (struct window *w, struct glyph_row *row, | |||
| 2219 | } | 2220 | } |
| 2220 | 2221 | ||
| 2221 | /* Must clip because of partially visible lines. */ | 2222 | /* Must clip because of partially visible lines. */ |
| 2222 | ns_clip_to_row (w, row, -1, YES); | 2223 | ns_clip_to_row (w, row, ANY_AREA, YES); |
| 2223 | 2224 | ||
| 2224 | if (!p->overlay_p) | 2225 | if (!p->overlay_p) |
| 2225 | { | 2226 | { |
| @@ -2399,7 +2400,7 @@ ns_draw_window_cursor (struct window *w, struct glyph_row *glyph_row, | |||
| 2399 | 2400 | ||
| 2400 | /* TODO: only needed in rare cases with last-resort font in HELLO.. | 2401 | /* TODO: only needed in rare cases with last-resort font in HELLO.. |
| 2401 | should we do this more efficiently? */ | 2402 | should we do this more efficiently? */ |
| 2402 | ns_clip_to_row (w, glyph_row, -1, NO); /* do ns_focus(f, &r, 1); if remove */ | 2403 | ns_clip_to_row (w, glyph_row, ANY_AREA, NO); /* do ns_focus(f, &r, 1); if remove */ |
| 2403 | 2404 | ||
| 2404 | 2405 | ||
| 2405 | face = FACE_FROM_ID (f, phys_cursor_glyph->face_id); | 2406 | face = FACE_FROM_ID (f, phys_cursor_glyph->face_id); |
| @@ -3710,7 +3711,7 @@ ns_set_vertical_scroll_bar (struct window *window, | |||
| 3710 | NSTRACE (ns_set_vertical_scroll_bar); | 3711 | NSTRACE (ns_set_vertical_scroll_bar); |
| 3711 | 3712 | ||
| 3712 | /* Get dimensions. */ | 3713 | /* Get dimensions. */ |
| 3713 | window_box (window, -1, 0, &window_y, 0, &window_height); | 3714 | window_box (window, ANY_AREA, 0, &window_y, 0, &window_height); |
| 3714 | top = window_y; | 3715 | top = window_y; |
| 3715 | height = window_height; | 3716 | height = window_height; |
| 3716 | width = WINDOW_CONFIG_SCROLL_BAR_COLS (window) * FRAME_COLUMN_WIDTH (f); | 3717 | width = WINDOW_CONFIG_SCROLL_BAR_COLS (window) * FRAME_COLUMN_WIDTH (f); |
diff --git a/src/w32term.c b/src/w32term.c index 394d348c97f..803ab551f8b 100644 --- a/src/w32term.c +++ b/src/w32term.c | |||
| @@ -240,7 +240,8 @@ static void x_frame_rehighlight (struct w32_display_info *); | |||
| 240 | static void x_draw_hollow_cursor (struct window *, struct glyph_row *); | 240 | static void x_draw_hollow_cursor (struct window *, struct glyph_row *); |
| 241 | static void x_draw_bar_cursor (struct window *, struct glyph_row *, int, | 241 | static void x_draw_bar_cursor (struct window *, struct glyph_row *, int, |
| 242 | enum text_cursor_kinds); | 242 | enum text_cursor_kinds); |
| 243 | static void w32_clip_to_row (struct window *, struct glyph_row *, int, HDC); | 243 | static void w32_clip_to_row (struct window *, struct glyph_row *, |
| 244 | enum glyph_row_area, HDC); | ||
| 244 | static BOOL my_show_window (struct frame *, HWND, int); | 245 | static BOOL my_show_window (struct frame *, HWND, int); |
| 245 | static void my_set_window_pos (HWND, HWND, int, int, int, int, UINT); | 246 | static void my_set_window_pos (HWND, HWND, int, int, int, int, UINT); |
| 246 | #if 0 | 247 | #if 0 |
| @@ -848,7 +849,7 @@ w32_draw_fringe_bitmap (struct window *w, struct glyph_row *row, | |||
| 848 | } | 849 | } |
| 849 | 850 | ||
| 850 | /* Must clip because of partially visible lines. */ | 851 | /* Must clip because of partially visible lines. */ |
| 851 | w32_clip_to_row (w, row, -1, hdc); | 852 | w32_clip_to_row (w, row, ANY_AREA, hdc); |
| 852 | 853 | ||
| 853 | if (p->which && p->which < max_fringe_bmp) | 854 | if (p->which && p->which < max_fringe_bmp) |
| 854 | { | 855 | { |
| @@ -2731,7 +2732,7 @@ x_scroll_run (struct window *w, struct run *run) | |||
| 2731 | /* Get frame-relative bounding box of the text display area of W, | 2732 | /* Get frame-relative bounding box of the text display area of W, |
| 2732 | without mode lines. Include in this box the left and right | 2733 | without mode lines. Include in this box the left and right |
| 2733 | fringes of W. */ | 2734 | fringes of W. */ |
| 2734 | window_box (w, -1, &x, &y, &width, &height); | 2735 | window_box (w, ANY_AREA, &x, &y, &width, &height); |
| 2735 | 2736 | ||
| 2736 | /* If the fringe is adjacent to the left (right) scroll bar of a | 2737 | /* If the fringe is adjacent to the left (right) scroll bar of a |
| 2737 | leftmost (rightmost, respectively) window, then extend its | 2738 | leftmost (rightmost, respectively) window, then extend its |
| @@ -3825,7 +3826,7 @@ w32_set_vertical_scroll_bar (struct window *w, | |||
| 3825 | bool fringe_extended_p; | 3826 | bool fringe_extended_p; |
| 3826 | 3827 | ||
| 3827 | /* Get window dimensions. */ | 3828 | /* Get window dimensions. */ |
| 3828 | window_box (w, -1, 0, &window_y, 0, &window_height); | 3829 | window_box (w, ANY_AREA, 0, &window_y, 0, &window_height); |
| 3829 | top = window_y; | 3830 | top = window_y; |
| 3830 | width = WINDOW_CONFIG_SCROLL_BAR_COLS (w) * FRAME_COLUMN_WIDTH (f); | 3831 | width = WINDOW_CONFIG_SCROLL_BAR_COLS (w) * FRAME_COLUMN_WIDTH (f); |
| 3831 | height = window_height; | 3832 | height = window_height; |
| @@ -5118,7 +5119,8 @@ w32_read_socket (struct terminal *terminal, | |||
| 5118 | mode lines must be clipped to the whole window. */ | 5119 | mode lines must be clipped to the whole window. */ |
| 5119 | 5120 | ||
| 5120 | static void | 5121 | static void |
| 5121 | w32_clip_to_row (struct window *w, struct glyph_row *row, int area, HDC hdc) | 5122 | w32_clip_to_row (struct window *w, struct glyph_row *row, |
| 5123 | enum glyph_row_area area, HDC hdc) | ||
| 5122 | { | 5124 | { |
| 5123 | RECT clip_rect; | 5125 | RECT clip_rect; |
| 5124 | int window_x, window_y, window_width; | 5126 | int window_x, window_y, window_width; |
diff --git a/src/xdisp.c b/src/xdisp.c index 44a8630bab4..b65800bd4c4 100644 --- a/src/xdisp.c +++ b/src/xdisp.c | |||
| @@ -966,12 +966,12 @@ window_text_bottom_y (struct window *w) | |||
| 966 | return height; | 966 | return height; |
| 967 | } | 967 | } |
| 968 | 968 | ||
| 969 | /* Return the pixel width of display area AREA of window W. AREA < 0 | 969 | /* Return the pixel width of display area AREA of window W. |
| 970 | means return the total width of W, not including fringes to | 970 | ANY_AREA means return the total width of W, not including |
| 971 | the left and right of the window. */ | 971 | fringes to the left and right of the window. */ |
| 972 | 972 | ||
| 973 | int | 973 | int |
| 974 | window_box_width (struct window *w, int area) | 974 | window_box_width (struct window *w, enum glyph_row_area area) |
| 975 | { | 975 | { |
| 976 | int cols = w->total_cols; | 976 | int cols = w->total_cols; |
| 977 | int pixels = 0; | 977 | int pixels = 0; |
| @@ -1049,11 +1049,11 @@ window_box_height (struct window *w) | |||
| 1049 | } | 1049 | } |
| 1050 | 1050 | ||
| 1051 | /* Return the window-relative coordinate of the left edge of display | 1051 | /* Return the window-relative coordinate of the left edge of display |
| 1052 | area AREA of window W. AREA < 0 means return the left edge of the | 1052 | area AREA of window W. ANY_AREA means return the left edge of the |
| 1053 | whole window, to the right of the left fringe of W. */ | 1053 | whole window, to the right of the left fringe of W. */ |
| 1054 | 1054 | ||
| 1055 | int | 1055 | int |
| 1056 | window_box_left_offset (struct window *w, int area) | 1056 | window_box_left_offset (struct window *w, enum glyph_row_area area) |
| 1057 | { | 1057 | { |
| 1058 | int x; | 1058 | int x; |
| 1059 | 1059 | ||
| @@ -1081,21 +1081,21 @@ window_box_left_offset (struct window *w, int area) | |||
| 1081 | 1081 | ||
| 1082 | 1082 | ||
| 1083 | /* Return the window-relative coordinate of the right edge of display | 1083 | /* Return the window-relative coordinate of the right edge of display |
| 1084 | area AREA of window W. AREA < 0 means return the right edge of the | 1084 | area AREA of window W. ANY_AREA means return the right edge of the |
| 1085 | whole window, to the left of the right fringe of W. */ | 1085 | whole window, to the left of the right fringe of W. */ |
| 1086 | 1086 | ||
| 1087 | int | 1087 | int |
| 1088 | window_box_right_offset (struct window *w, int area) | 1088 | window_box_right_offset (struct window *w, enum glyph_row_area area) |
| 1089 | { | 1089 | { |
| 1090 | return window_box_left_offset (w, area) + window_box_width (w, area); | 1090 | return window_box_left_offset (w, area) + window_box_width (w, area); |
| 1091 | } | 1091 | } |
| 1092 | 1092 | ||
| 1093 | /* Return the frame-relative coordinate of the left edge of display | 1093 | /* Return the frame-relative coordinate of the left edge of display |
| 1094 | area AREA of window W. AREA < 0 means return the left edge of the | 1094 | area AREA of window W. ANY_AREA means return the left edge of the |
| 1095 | whole window, to the right of the left fringe of W. */ | 1095 | whole window, to the right of the left fringe of W. */ |
| 1096 | 1096 | ||
| 1097 | int | 1097 | int |
| 1098 | window_box_left (struct window *w, int area) | 1098 | window_box_left (struct window *w, enum glyph_row_area area) |
| 1099 | { | 1099 | { |
| 1100 | struct frame *f = XFRAME (w->frame); | 1100 | struct frame *f = XFRAME (w->frame); |
| 1101 | int x; | 1101 | int x; |
| @@ -1111,25 +1111,25 @@ window_box_left (struct window *w, int area) | |||
| 1111 | 1111 | ||
| 1112 | 1112 | ||
| 1113 | /* Return the frame-relative coordinate of the right edge of display | 1113 | /* Return the frame-relative coordinate of the right edge of display |
| 1114 | area AREA of window W. AREA < 0 means return the right edge of the | 1114 | area AREA of window W. ANY_AREA means return the right edge of the |
| 1115 | whole window, to the left of the right fringe of W. */ | 1115 | whole window, to the left of the right fringe of W. */ |
| 1116 | 1116 | ||
| 1117 | int | 1117 | int |
| 1118 | window_box_right (struct window *w, int area) | 1118 | window_box_right (struct window *w, enum glyph_row_area area) |
| 1119 | { | 1119 | { |
| 1120 | return window_box_left (w, area) + window_box_width (w, area); | 1120 | return window_box_left (w, area) + window_box_width (w, area); |
| 1121 | } | 1121 | } |
| 1122 | 1122 | ||
| 1123 | /* Get the bounding box of the display area AREA of window W, without | 1123 | /* Get the bounding box of the display area AREA of window W, without |
| 1124 | mode lines, in frame-relative coordinates. AREA < 0 means the | 1124 | mode lines, in frame-relative coordinates. ANY_AREA means the |
| 1125 | whole window, not including the left and right fringes of | 1125 | whole window, not including the left and right fringes of |
| 1126 | the window. Return in *BOX_X and *BOX_Y the frame-relative pixel | 1126 | the window. Return in *BOX_X and *BOX_Y the frame-relative pixel |
| 1127 | coordinates of the upper-left corner of the box. Return in | 1127 | coordinates of the upper-left corner of the box. Return in |
| 1128 | *BOX_WIDTH, and *BOX_HEIGHT the pixel width and height of the box. */ | 1128 | *BOX_WIDTH, and *BOX_HEIGHT the pixel width and height of the box. */ |
| 1129 | 1129 | ||
| 1130 | void | 1130 | void |
| 1131 | window_box (struct window *w, int area, int *box_x, int *box_y, | 1131 | window_box (struct window *w, enum glyph_row_area area, int *box_x, |
| 1132 | int *box_width, int *box_height) | 1132 | int *box_y, int *box_width, int *box_height) |
| 1133 | { | 1133 | { |
| 1134 | if (box_width) | 1134 | if (box_width) |
| 1135 | *box_width = window_box_width (w, area); | 1135 | *box_width = window_box_width (w, area); |
| @@ -1147,19 +1147,18 @@ window_box (struct window *w, int area, int *box_x, int *box_y, | |||
| 1147 | 1147 | ||
| 1148 | 1148 | ||
| 1149 | /* Get the bounding box of the display area AREA of window W, without | 1149 | /* Get the bounding box of the display area AREA of window W, without |
| 1150 | mode lines. AREA < 0 means the whole window, not including the | 1150 | mode lines and both fringes of the window. Return in *TOP_LEFT_X |
| 1151 | left and right fringe of the window. Return in *TOP_LEFT_X | ||
| 1152 | and TOP_LEFT_Y the frame-relative pixel coordinates of the | 1151 | and TOP_LEFT_Y the frame-relative pixel coordinates of the |
| 1153 | upper-left corner of the box. Return in *BOTTOM_RIGHT_X, and | 1152 | upper-left corner of the box. Return in *BOTTOM_RIGHT_X, and |
| 1154 | *BOTTOM_RIGHT_Y the coordinates of the bottom-right corner of the | 1153 | *BOTTOM_RIGHT_Y the coordinates of the bottom-right corner of the |
| 1155 | box. */ | 1154 | box. */ |
| 1156 | 1155 | ||
| 1157 | static void | 1156 | static void |
| 1158 | window_box_edges (struct window *w, int area, int *top_left_x, int *top_left_y, | 1157 | window_box_edges (struct window *w, int *top_left_x, int *top_left_y, |
| 1159 | int *bottom_right_x, int *bottom_right_y) | 1158 | int *bottom_right_x, int *bottom_right_y) |
| 1160 | { | 1159 | { |
| 1161 | window_box (w, area, top_left_x, top_left_y, bottom_right_x, | 1160 | window_box (w, ANY_AREA, top_left_x, top_left_y, |
| 1162 | bottom_right_y); | 1161 | bottom_right_x, bottom_right_y); |
| 1163 | *bottom_right_x += *top_left_x; | 1162 | *bottom_right_x += *top_left_x; |
| 1164 | *bottom_right_y += *top_left_y; | 1163 | *bottom_right_y += *top_left_y; |
| 1165 | } | 1164 | } |
| @@ -28727,7 +28726,7 @@ x_draw_vertical_border (struct window *w) | |||
| 28727 | { | 28726 | { |
| 28728 | int x0, x1, y0, y1; | 28727 | int x0, x1, y0, y1; |
| 28729 | 28728 | ||
| 28730 | window_box_edges (w, -1, &x0, &y0, &x1, &y1); | 28729 | window_box_edges (w, &x0, &y0, &x1, &y1); |
| 28731 | y1 -= 1; | 28730 | y1 -= 1; |
| 28732 | 28731 | ||
| 28733 | if (WINDOW_LEFT_FRINGE_WIDTH (w) == 0) | 28732 | if (WINDOW_LEFT_FRINGE_WIDTH (w) == 0) |
| @@ -28740,7 +28739,7 @@ x_draw_vertical_border (struct window *w) | |||
| 28740 | { | 28739 | { |
| 28741 | int x0, x1, y0, y1; | 28740 | int x0, x1, y0, y1; |
| 28742 | 28741 | ||
| 28743 | window_box_edges (w, -1, &x0, &y0, &x1, &y1); | 28742 | window_box_edges (w, &x0, &y0, &x1, &y1); |
| 28744 | y1 -= 1; | 28743 | y1 -= 1; |
| 28745 | 28744 | ||
| 28746 | if (WINDOW_LEFT_FRINGE_WIDTH (w) == 0) | 28745 | if (WINDOW_LEFT_FRINGE_WIDTH (w) == 0) |
diff --git a/src/xterm.c b/src/xterm.c index b7a98dbc5c1..ef2a2bc8c8c 100644 --- a/src/xterm.c +++ b/src/xterm.c | |||
| @@ -314,7 +314,8 @@ static void x_draw_hollow_cursor (struct window *, struct glyph_row *); | |||
| 314 | static void x_draw_bar_cursor (struct window *, struct glyph_row *, int, | 314 | static void x_draw_bar_cursor (struct window *, struct glyph_row *, int, |
| 315 | enum text_cursor_kinds); | 315 | enum text_cursor_kinds); |
| 316 | 316 | ||
| 317 | static void x_clip_to_row (struct window *, struct glyph_row *, int, GC); | 317 | static void x_clip_to_row (struct window *, struct glyph_row *, |
| 318 | enum glyph_row_area, GC); | ||
| 318 | static void x_flush (struct frame *f); | 319 | static void x_flush (struct frame *f); |
| 319 | static void x_update_begin (struct frame *); | 320 | static void x_update_begin (struct frame *); |
| 320 | static void x_update_window_begin (struct window *); | 321 | static void x_update_window_begin (struct window *); |
| @@ -715,7 +716,7 @@ x_draw_fringe_bitmap (struct window *w, struct glyph_row *row, struct draw_fring | |||
| 715 | struct face *face = p->face; | 716 | struct face *face = p->face; |
| 716 | 717 | ||
| 717 | /* Must clip because of partially visible lines. */ | 718 | /* Must clip because of partially visible lines. */ |
| 718 | x_clip_to_row (w, row, -1, gc); | 719 | x_clip_to_row (w, row, ANY_AREA, gc); |
| 719 | 720 | ||
| 720 | if (!p->overlay_p) | 721 | if (!p->overlay_p) |
| 721 | { | 722 | { |
| @@ -3247,7 +3248,7 @@ x_scroll_run (struct window *w, struct run *run) | |||
| 3247 | /* Get frame-relative bounding box of the text display area of W, | 3248 | /* Get frame-relative bounding box of the text display area of W, |
| 3248 | without mode lines. Include in this box the left and right | 3249 | without mode lines. Include in this box the left and right |
| 3249 | fringe of W. */ | 3250 | fringe of W. */ |
| 3250 | window_box (w, -1, &x, &y, &width, &height); | 3251 | window_box (w, ANY_AREA, &x, &y, &width, &height); |
| 3251 | 3252 | ||
| 3252 | #ifdef USE_TOOLKIT_SCROLL_BARS | 3253 | #ifdef USE_TOOLKIT_SCROLL_BARS |
| 3253 | /* If the fringe is adjacent to the left (right) scroll bar of a | 3254 | /* If the fringe is adjacent to the left (right) scroll bar of a |
| @@ -5147,7 +5148,7 @@ XTset_vertical_scroll_bar (struct window *w, int portion, int whole, int positio | |||
| 5147 | #endif | 5148 | #endif |
| 5148 | 5149 | ||
| 5149 | /* Get window dimensions. */ | 5150 | /* Get window dimensions. */ |
| 5150 | window_box (w, -1, 0, &window_y, 0, &window_height); | 5151 | window_box (w, ANY_AREA, 0, &window_y, 0, &window_height); |
| 5151 | top = window_y; | 5152 | top = window_y; |
| 5152 | width = WINDOW_CONFIG_SCROLL_BAR_COLS (w) * FRAME_COLUMN_WIDTH (f); | 5153 | width = WINDOW_CONFIG_SCROLL_BAR_COLS (w) * FRAME_COLUMN_WIDTH (f); |
| 5153 | height = window_height; | 5154 | height = window_height; |
| @@ -7170,7 +7171,8 @@ XTread_socket (struct terminal *terminal, struct input_event *hold_quit) | |||
| 7170 | mode lines must be clipped to the whole window. */ | 7171 | mode lines must be clipped to the whole window. */ |
| 7171 | 7172 | ||
| 7172 | static void | 7173 | static void |
| 7173 | x_clip_to_row (struct window *w, struct glyph_row *row, int area, GC gc) | 7174 | x_clip_to_row (struct window *w, struct glyph_row *row, |
| 7175 | enum glyph_row_area area, GC gc) | ||
| 7174 | { | 7176 | { |
| 7175 | struct frame *f = XFRAME (WINDOW_FRAME (w)); | 7177 | struct frame *f = XFRAME (WINDOW_FRAME (w)); |
| 7176 | XRectangle clip_rect; | 7178 | XRectangle clip_rect; |