aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorGerd Moellmann2001-07-27 15:28:08 +0000
committerGerd Moellmann2001-07-27 15:28:08 +0000
commit98b8a90f65821094abe0701c989628e91a09a751 (patch)
treec00014482afd11a33e85b96a2e5cf939527498f9 /src
parentcb79ea6486c16cabfe57290aef03c83bee090f74 (diff)
downloademacs-98b8a90f65821094abe0701c989628e91a09a751.tar.gz
emacs-98b8a90f65821094abe0701c989628e91a09a751.zip
(x_get_glyph_string_clip_rect): Minor cleanup.
Diffstat (limited to 'src')
-rw-r--r--src/xterm.c32
1 files changed, 17 insertions, 15 deletions
diff --git a/src/xterm.c b/src/xterm.c
index be86909b23b..f69d3ef0718 100644
--- a/src/xterm.c
+++ b/src/xterm.c
@@ -2841,20 +2841,6 @@ x_get_glyph_string_clip_rect (s, r)
2841 r->height = s->row->visible_height; 2841 r->height = s->row->visible_height;
2842 } 2842 }
2843 2843
2844 /* Don't use S->y for clipping because it doesn't take partially
2845 visible lines into account. For example, it can be negative for
2846 partially visible lines at the top of a window. */
2847 if (!s->row->full_width_p
2848 && MATRIX_ROW_PARTIALLY_VISIBLE_AT_TOP_P (s->w, s->row))
2849 r->y = WINDOW_DISPLAY_HEADER_LINE_HEIGHT (s->w);
2850 else
2851 r->y = max (0, s->row->y);
2852
2853 /* If drawing a tool-bar window, draw it over the internal border
2854 at the top of the window. */
2855 if (s->w == XWINDOW (s->f->tool_bar_window))
2856 r->y -= s->f->output_data.x->internal_border_width;
2857
2858 /* If S draws overlapping rows, it's sufficient to use the top and 2844 /* If S draws overlapping rows, it's sufficient to use the top and
2859 bottom of the window for clipping because this glyph string 2845 bottom of the window for clipping because this glyph string
2860 intentionally draws over other lines. */ 2846 intentionally draws over other lines. */
@@ -2863,7 +2849,23 @@ x_get_glyph_string_clip_rect (s, r)
2863 r->y = WINDOW_DISPLAY_HEADER_LINE_HEIGHT (s->w); 2849 r->y = WINDOW_DISPLAY_HEADER_LINE_HEIGHT (s->w);
2864 r->height = window_text_bottom_y (s->w) - r->y; 2850 r->height = window_text_bottom_y (s->w) - r->y;
2865 } 2851 }
2866 2852 else
2853 {
2854 /* Don't use S->y for clipping because it doesn't take partially
2855 visible lines into account. For example, it can be negative for
2856 partially visible lines at the top of a window. */
2857 if (!s->row->full_width_p
2858 && MATRIX_ROW_PARTIALLY_VISIBLE_AT_TOP_P (s->w, s->row))
2859 r->y = WINDOW_DISPLAY_HEADER_LINE_HEIGHT (s->w);
2860 else
2861 r->y = max (0, s->row->y);
2862
2863 /* If drawing a tool-bar window, draw it over the internal border
2864 at the top of the window. */
2865 if (s->w == XWINDOW (s->f->tool_bar_window))
2866 r->y -= s->f->output_data.x->internal_border_width;
2867 }
2868
2867 r->y = WINDOW_TO_FRAME_PIXEL_Y (s->w, r->y); 2869 r->y = WINDOW_TO_FRAME_PIXEL_Y (s->w, r->y);
2868} 2870}
2869 2871