comparison src/xterm.c @ 25189:710445260df6

(x_draw_phys_cursor_glyph): Redraw overlaps. (x_fix_overlapping_area): New. (x_redisplay_interface): Add x_fix_overlapping_area. (x_draw_glyphs): Add parameter overlaps_p. (struct glyph_string): Add member for_overlaps_p. (x_get_glyph_string_clip_rect): If glyph string draws foreground of overlapping rows, clip to window bottom. (x_fill_glyph_string): Add parameter overlaps_p. (x_fill_composite_glyph_string): Ditto. (BUILD_GLYPH_STRINGS): Ditto. (BUILD_CHAR_GLYPH_STRINGS): Ditto. (x_draw_glyph_string): Don't draw anything but the foreground if glyph string draws row overlaps. (x_append_glyph): Set glyph flag overlaps_vertically_p. (x_produce_image_glyph): Compute iterator's physical ascent and descent. (x_produce_stretch_glyph): Ditto. (x_produce_glyphs): Ditto.
author Gerd Moellmann <gerd@gnu.org>
date Fri, 06 Aug 1999 13:59:59 +0000
parents 1c02364724aa
children 3a5376feb9aa
comparison
equal deleted inserted replaced
25188:6849f435f6e8 25189:710445260df6
1438 glyph->object = it->object; 1438 glyph->object = it->object;
1439 glyph->left_box_line_p = it->start_of_box_run_p; 1439 glyph->left_box_line_p = it->start_of_box_run_p;
1440 glyph->right_box_line_p = it->end_of_box_run_p; 1440 glyph->right_box_line_p = it->end_of_box_run_p;
1441 glyph->voffset = it->voffset; 1441 glyph->voffset = it->voffset;
1442 glyph->multibyte_p = it->multibyte_p; 1442 glyph->multibyte_p = it->multibyte_p;
1443 glyph->overlaps_vertically_p = (it->phys_ascent > it->ascent
1444 || it->phys_descent > it->descent);
1443 ++it->glyph_row->used[area]; 1445 ++it->glyph_row->used[area];
1444 } 1446 }
1445 } 1447 }
1446 1448
1447 1449
1485 1487
1486 /* Make sure X resources of the face and image are loaded. */ 1488 /* Make sure X resources of the face and image are loaded. */
1487 PREPARE_FACE_FOR_DISPLAY (it->f, face); 1489 PREPARE_FACE_FOR_DISPLAY (it->f, face);
1488 prepare_image_for_display (it->f, img); 1490 prepare_image_for_display (it->f, img);
1489 1491
1490 it->ascent = IMAGE_ASCENT (img); 1492 it->ascent = it->phys_ascent = IMAGE_ASCENT (img);
1491 it->descent = img->height + 2 * img->margin - it->ascent; 1493 it->descent = it->phys_descent = img->height + 2 * img->margin - it->ascent;
1492 it->pixel_width = img->width + 2 * img->margin; 1494 it->pixel_width = img->width + 2 * img->margin;
1493 1495
1494 it->nglyphs = 1; 1496 it->nglyphs = 1;
1495 1497
1496 if (face->box != FACE_NO_BOX) 1498 if (face->box != FACE_NO_BOX)
1689 object = it->w->buffer; 1691 object = it->w->buffer;
1690 x_append_stretch_glyph (it, object, width, height, ascent); 1692 x_append_stretch_glyph (it, object, width, height, ascent);
1691 } 1693 }
1692 1694
1693 it->pixel_width = width; 1695 it->pixel_width = width;
1694 it->ascent = height * ascent; 1696 it->ascent = it->phys_ascent = height * ascent;
1695 it->descent = height - it->ascent; 1697 it->descent = it->phys_descent = height - it->ascent;
1696 it->nglyphs = 1; 1698 it->nglyphs = 1;
1697 1699
1698 if (face->box != FACE_NO_BOX) 1700 if (face->box != FACE_NO_BOX)
1699 { 1701 {
1700 it->ascent += face->box_line_width; 1702 it->ascent += face->box_line_width;
1756 { 1758 {
1757 /* Either unibyte or ASCII. */ 1759 /* Either unibyte or ASCII. */
1758 int stretched_p; 1760 int stretched_p;
1759 1761
1760 it->nglyphs = 1; 1762 it->nglyphs = 1;
1763
1764 pcm = x_per_char_metric (font, &char2b);
1761 it->ascent = font->ascent; 1765 it->ascent = font->ascent;
1762 it->descent = font->descent; 1766 it->descent = font->descent;
1763 1767 it->phys_ascent = pcm->ascent;
1764 pcm = x_per_char_metric (font, &char2b); 1768 it->phys_descent = pcm->descent;
1765 it->pixel_width = pcm->width; 1769 it->pixel_width = pcm->width;
1766 1770
1767 /* If this is a space inside a region of text with 1771 /* If this is a space inside a region of text with
1768 `space-width' property, change its width. */ 1772 `space-width' property, change its width. */
1769 stretched_p = it->char_to_display == ' ' && !NILP (it->space_width); 1773 stretched_p = it->char_to_display == ' ' && !NILP (it->space_width);
1818 else if (it->char_to_display == '\n') 1822 else if (it->char_to_display == '\n')
1819 { 1823 {
1820 /* A newline has no width but we need the height of the line. */ 1824 /* A newline has no width but we need the height of the line. */
1821 it->pixel_width = 0; 1825 it->pixel_width = 0;
1822 it->nglyphs = 0; 1826 it->nglyphs = 0;
1823 it->ascent = font->ascent; 1827 it->ascent = it->phys_ascent = font->ascent;
1824 it->descent = font->descent; 1828 it->descent = it->phys_descent = font->descent;
1825 1829
1826 if (face->box != FACE_NO_BOX) 1830 if (face->box != FACE_NO_BOX)
1827 { 1831 {
1828 int thick = face->box_line_width; 1832 int thick = face->box_line_width;
1829 it->ascent += thick; 1833 it->ascent += thick;
1838 + it->continuation_lines_width); 1842 + it->continuation_lines_width);
1839 int next_tab_x = ((1 + x + tab_width - 1) / tab_width) * tab_width; 1843 int next_tab_x = ((1 + x + tab_width - 1) / tab_width) * tab_width;
1840 1844
1841 it->pixel_width = next_tab_x - x; 1845 it->pixel_width = next_tab_x - x;
1842 it->nglyphs = 1; 1846 it->nglyphs = 1;
1843 it->ascent = font->ascent; 1847 it->ascent = it->phys_ascent = font->ascent;
1844 it->descent = font->descent; 1848 it->descent = it->phys_descent = font->descent;
1845 1849
1846 if (it->glyph_row) 1850 if (it->glyph_row)
1847 { 1851 {
1848 double ascent = (double) it->ascent / (it->ascent + it->descent); 1852 double ascent = (double) it->ascent / (it->ascent + it->descent);
1849 x_append_stretch_glyph (it, it->object, it->pixel_width, 1853 x_append_stretch_glyph (it, it->object, it->pixel_width,
1877 1881
1878 /* These settings may not be correct. We must have more 1882 /* These settings may not be correct. We must have more
1879 information in cmpcharp to do the correct setting. */ 1883 information in cmpcharp to do the correct setting. */
1880 it->ascent = font->ascent; 1884 it->ascent = font->ascent;
1881 it->descent = font->descent; 1885 it->descent = font->descent;
1886 it->phys_ascent = font->max_bounds.ascent;
1887 it->phys_descent = font->max_bounds.descent;
1882 } 1888 }
1883 else 1889 else
1884 { 1890 {
1885 /* If we found a font, this font should give us the right 1891 /* If we found a font, this font should give us the right
1886 metrics. If we didn't find a font, use the frame's 1892 metrics. If we didn't find a font, use the frame's
1892 if (font_not_found_p) 1898 if (font_not_found_p)
1893 it->pixel_width *= CHARSET_WIDTH (it->charset); 1899 it->pixel_width *= CHARSET_WIDTH (it->charset);
1894 it->nglyphs = 1; 1900 it->nglyphs = 1;
1895 it->ascent = font->ascent; 1901 it->ascent = font->ascent;
1896 it->descent = font->descent; 1902 it->descent = font->descent;
1903 it->phys_ascent = pcm->ascent;
1904 it->phys_descent = pcm->descent;
1897 if (it->glyph_row 1905 if (it->glyph_row
1898 && (pcm->lbearing < 0 1906 && (pcm->lbearing < 0
1899 || pcm->rbearing > pcm->width)) 1907 || pcm->rbearing > pcm->width))
1900 it->glyph_row->contains_overlapping_glyphs_p = 1; 1908 it->glyph_row->contains_overlapping_glyphs_p = 1;
1901 } 1909 }
1930 1938
1931 /* Accumulate dimensions. */ 1939 /* Accumulate dimensions. */
1932 xassert (it->ascent >= 0 && it->descent > 0); 1940 xassert (it->ascent >= 0 && it->descent > 0);
1933 if (it->area == TEXT_AREA) 1941 if (it->area == TEXT_AREA)
1934 it->current_x += it->pixel_width; 1942 it->current_x += it->pixel_width;
1943
1935 it->max_ascent = max (it->max_ascent, it->ascent); 1944 it->max_ascent = max (it->max_ascent, it->ascent);
1936 it->max_descent = max (it->max_descent, it->descent); 1945 it->max_descent = max (it->max_descent, it->descent);
1946 it->max_phys_ascent = max (it->max_phys_ascent, it->phys_ascent);
1947 it->max_phys_descent = max (it->max_phys_descent, it->phys_descent);
1937 } 1948 }
1938 1949
1939 1950
1940 /* Estimate the pixel height of the mode or top line on frame F. 1951 /* Estimate the pixel height of the mode or top line on frame F.
1941 FACE_ID specifies what line's height to estimate. */ 1952 FACE_ID specifies what line's height to estimate. */
2062 unsigned font_not_found_p : 1; 2073 unsigned font_not_found_p : 1;
2063 2074
2064 /* 1 means that the face in which this glyph string is drawn has a 2075 /* 1 means that the face in which this glyph string is drawn has a
2065 stipple pattern. */ 2076 stipple pattern. */
2066 unsigned stippled_p : 1; 2077 unsigned stippled_p : 1;
2078
2079 /* 1 means only the foreground of this glyph string must be drawn,
2080 and we should use the physical height of the line this glyph
2081 string appears in as clip rect. */
2082 unsigned for_overlaps_p : 1;
2067 2083
2068 /* The GC to use for drawing this glyph string. */ 2084 /* The GC to use for drawing this glyph string. */
2069 GC gc; 2085 GC gc;
2070 2086
2071 /* A pointer to the first glyph in the string. This glyph 2087 /* A pointer to the first glyph in the string. This glyph
2117 struct glyph_string *)); 2133 struct glyph_string *));
2118 static int x_left_overwritten P_ ((struct glyph_string *)); 2134 static int x_left_overwritten P_ ((struct glyph_string *));
2119 static int x_left_overwriting P_ ((struct glyph_string *)); 2135 static int x_left_overwriting P_ ((struct glyph_string *));
2120 static int x_right_overwritten P_ ((struct glyph_string *)); 2136 static int x_right_overwritten P_ ((struct glyph_string *));
2121 static int x_right_overwriting P_ ((struct glyph_string *)); 2137 static int x_right_overwriting P_ ((struct glyph_string *));
2122 static int x_fill_glyph_string P_ ((struct glyph_string *, int, int, int)); 2138 static int x_fill_glyph_string P_ ((struct glyph_string *, int, int, int,
2139 int));
2123 static void x_init_glyph_string P_ ((struct glyph_string *, 2140 static void x_init_glyph_string P_ ((struct glyph_string *,
2124 XChar2b *, struct window *, 2141 XChar2b *, struct window *,
2125 struct glyph_row *, 2142 struct glyph_row *,
2126 enum glyph_row_area, int, 2143 enum glyph_row_area, int,
2127 enum draw_glyphs_face)); 2144 enum draw_glyphs_face));
2128 static int x_draw_glyphs P_ ((struct window *, int , struct glyph_row *, 2145 static int x_draw_glyphs P_ ((struct window *, int , struct glyph_row *,
2129 enum glyph_row_area, int, int, 2146 enum glyph_row_area, int, int,
2130 enum draw_glyphs_face, int *, int *)); 2147 enum draw_glyphs_face, int *, int *, int));
2131 static void x_set_glyph_string_clipping P_ ((struct glyph_string *)); 2148 static void x_set_glyph_string_clipping P_ ((struct glyph_string *));
2132 static void x_set_glyph_string_gc P_ ((struct glyph_string *)); 2149 static void x_set_glyph_string_gc P_ ((struct glyph_string *));
2133 static void x_draw_glyph_string_background P_ ((struct glyph_string *, 2150 static void x_draw_glyph_string_background P_ ((struct glyph_string *,
2134 int)); 2151 int));
2135 static void x_draw_glyph_string_foreground P_ ((struct glyph_string *)); 2152 static void x_draw_glyph_string_foreground P_ ((struct glyph_string *));
2157 int, int, int)); 2174 int, int, int));
2158 static void x_draw_relief_rect P_ ((struct frame *, int, int, int, int, 2175 static void x_draw_relief_rect P_ ((struct frame *, int, int, int, int,
2159 int, int, int, int, XRectangle *)); 2176 int, int, int, int, XRectangle *));
2160 static void x_draw_box_rect P_ ((struct glyph_string *, int, int, int, int, 2177 static void x_draw_box_rect P_ ((struct glyph_string *, int, int, int, int,
2161 int, int, int, XRectangle *)); 2178 int, int, int, XRectangle *));
2162 2179 static void x_fix_overlapping_area P_ ((struct window *, struct glyph_row *,
2163 2180 enum glyph_row_area));
2164 2181
2182
2165 /* Append the list of glyph strings with head H and tail T to the list 2183 /* Append the list of glyph strings with head H and tail T to the list
2166 with head *HEAD and tail *TAIL. Set *HEAD and *TAIL to the result. */ 2184 with head *HEAD and tail *TAIL. Set *HEAD and *TAIL to the result. */
2167 2185
2168 static INLINE void 2186 static INLINE void
2169 x_append_glyph_string_lists (head, tail, h, t) 2187 x_append_glyph_string_lists (head, tail, h, t)
2418 if (!s->row->full_width_p 2436 if (!s->row->full_width_p
2419 && MATRIX_ROW_PARTIALLY_VISIBLE_AT_TOP_P (s->w, s->row)) 2437 && MATRIX_ROW_PARTIALLY_VISIBLE_AT_TOP_P (s->w, s->row))
2420 r->y = WINDOW_DISPLAY_TOP_LINE_HEIGHT (s->w); 2438 r->y = WINDOW_DISPLAY_TOP_LINE_HEIGHT (s->w);
2421 else 2439 else
2422 r->y = max (0, s->row->y); 2440 r->y = max (0, s->row->y);
2423 r->y = WINDOW_TO_FRAME_PIXEL_Y (s->w, r->y);
2424 2441
2425 /* If drawing a toolbar window, draw it over the internal border 2442 /* If drawing a toolbar window, draw it over the internal border
2426 at the top of the window. */ 2443 at the top of the window. */
2427 if (s->w == XWINDOW (s->f->toolbar_window)) 2444 if (s->w == XWINDOW (s->f->toolbar_window))
2428 r->y -= s->f->output_data.x->internal_border_width; 2445 r->y -= s->f->output_data.x->internal_border_width;
2446
2447 /* If S draws overlapping rows, it's sufficient to use the top and
2448 bottom of the window for clipping because this glyph string
2449 intentionally draws over other lines. */
2450 if (s->for_overlaps_p)
2451 {
2452 r->y = WINDOW_DISPLAY_TOP_LINE_HEIGHT (s->w);
2453 r->height = window_text_bottom_y (s->w) - r->y;
2454 }
2455
2456 r->y = WINDOW_TO_FRAME_PIXEL_Y (s->w, r->y);
2429 } 2457 }
2430 2458
2431 2459
2432 /* Set clipping for output of glyph string S. S may be part of a mode 2460 /* Set clipping for output of glyph string S. S may be part of a mode
2433 line or menu if we don't have X toolkit support. */ 2461 line or menu if we don't have X toolkit support. */
2752 filled. Otherwise, use XDrawImageString. (Note that 2780 filled. Otherwise, use XDrawImageString. (Note that
2753 XDrawImageString is usually faster than XDrawString.) 2781 XDrawImageString is usually faster than XDrawString.)
2754 Always use XDrawImageString when drawing the cursor so 2782 Always use XDrawImageString when drawing the cursor so
2755 that there is no chance that characters under a box 2783 that there is no chance that characters under a box
2756 cursor are invisible. */ 2784 cursor are invisible. */
2757 if (s->background_filled_p && s->hl != DRAW_CURSOR) 2785 if (s->for_overlaps_p
2786 || (s->background_filled_p && s->hl != DRAW_CURSOR))
2758 { 2787 {
2759 /* Draw characters with 16-bit or 8-bit functions. */ 2788 /* Draw characters with 16-bit or 8-bit functions. */
2760 if (s->two_byte_p) 2789 if (s->two_byte_p)
2761 XDrawString16 (s->display, s->window, s->gc, x, s->ybase, 2790 XDrawString16 (s->display, s->window, s->gc, x, s->ybase,
2762 s->char2b, s->nchars); 2791 s->char2b, s->nchars);
3673 struct glyph_string *s; 3702 struct glyph_string *s;
3674 { 3703 {
3675 /* If S draws into the background of its successor, draw the 3704 /* If S draws into the background of its successor, draw the
3676 background of the successor first so that S can draw into it. 3705 background of the successor first so that S can draw into it.
3677 This makes S->next use XDrawString instead of XDrawImageString. */ 3706 This makes S->next use XDrawString instead of XDrawImageString. */
3678 if (s->next && s->right_overhang) 3707 if (s->next && s->right_overhang && !s->for_overlaps_p)
3679 { 3708 {
3680 xassert (s->next->img == NULL); 3709 xassert (s->next->img == NULL);
3681 x_set_glyph_string_gc (s->next); 3710 x_set_glyph_string_gc (s->next);
3682 x_set_glyph_string_clipping (s->next); 3711 x_set_glyph_string_clipping (s->next);
3683 x_draw_glyph_string_background (s->next, 1); 3712 x_draw_glyph_string_background (s->next, 1);
3696 case STRETCH_GLYPH: 3725 case STRETCH_GLYPH:
3697 x_draw_stretch_glyph_string (s); 3726 x_draw_stretch_glyph_string (s);
3698 break; 3727 break;
3699 3728
3700 case CHAR_GLYPH: 3729 case CHAR_GLYPH:
3701 x_draw_glyph_string_background (s, 0); 3730 if (s->for_overlaps_p)
3731 s->background_filled_p = 1;
3732 else
3733 x_draw_glyph_string_background (s, 0);
3702 x_draw_glyph_string_foreground (s); 3734 x_draw_glyph_string_foreground (s);
3703 break; 3735 break;
3704 3736
3705 default: 3737 default:
3706 abort (); 3738 abort ();
3707 } 3739 }
3708 3740
3709 /* Draw underline. */ 3741 if (!s->for_overlaps_p)
3710 if (s->face->underline_p) 3742 {
3711 { 3743 /* Draw underline. */
3712 unsigned long dy, h; 3744 if (s->face->underline_p)
3713 3745 {
3714 if (!XGetFontProperty (s->font, XA_UNDERLINE_THICKNESS, &h)) 3746 unsigned long dy, h;
3715 h = 1; 3747
3716 if (!XGetFontProperty (s->font, XA_UNDERLINE_POSITION, &dy)) 3748 if (!XGetFontProperty (s->font, XA_UNDERLINE_THICKNESS, &h))
3717 dy = s->height - h; 3749 h = 1;
3750 if (!XGetFontProperty (s->font, XA_UNDERLINE_POSITION, &dy))
3751 dy = s->height - h;
3718 3752
3719 if (s->face->underline_defaulted_p) 3753 if (s->face->underline_defaulted_p)
3720 XFillRectangle (s->display, s->window, s->gc, s->x, s->y + dy, 3754 XFillRectangle (s->display, s->window, s->gc, s->x, s->y + dy,
3721 s->width, h); 3755 s->width, h);
3722 else 3756 else
3757 {
3758 XGCValues xgcv;
3759 XGetGCValues (s->display, s->gc, GCForeground, &xgcv);
3760 XSetForeground (s->display, s->gc, s->face->underline_color);
3761 XFillRectangle (s->display, s->window, s->gc, s->x, s->y + dy,
3762 s->width, h);
3763 XSetForeground (s->display, s->gc, xgcv.foreground);
3764 }
3765 }
3766
3767 /* Draw overline. */
3768 if (s->face->overline_p)
3723 { 3769 {
3724 XGCValues xgcv; 3770 unsigned long dy = 0, h = 1;
3725 XGetGCValues (s->display, s->gc, GCForeground, &xgcv); 3771
3726 XSetForeground (s->display, s->gc, s->face->underline_color); 3772 if (s->face->overline_color_defaulted_p)
3727 XFillRectangle (s->display, s->window, s->gc, s->x, s->y + dy, 3773 XFillRectangle (s->display, s->window, s->gc, s->x, s->y + dy,
3728 s->width, h); 3774 s->width, h);
3729 XSetForeground (s->display, s->gc, xgcv.foreground); 3775 else
3776 {
3777 XGCValues xgcv;
3778 XGetGCValues (s->display, s->gc, GCForeground, &xgcv);
3779 XSetForeground (s->display, s->gc, s->face->overline_color);
3780 XFillRectangle (s->display, s->window, s->gc, s->x, s->y + dy,
3781 s->width, h);
3782 XSetForeground (s->display, s->gc, xgcv.foreground);
3783 }
3730 } 3784 }
3731 } 3785
3732 3786 /* Draw strike-through. */
3733 /* Draw overline. */ 3787 if (s->face->strike_through_p)
3734 if (s->face->overline_p)
3735 {
3736 unsigned long dy = 0, h = 1;
3737
3738 if (s->face->overline_color_defaulted_p)
3739 XFillRectangle (s->display, s->window, s->gc, s->x, s->y + dy,
3740 s->width, h);
3741 else
3742 { 3788 {
3743 XGCValues xgcv; 3789 unsigned long h = 1;
3744 XGetGCValues (s->display, s->gc, GCForeground, &xgcv); 3790 unsigned long dy = (s->height - h) / 2;
3745 XSetForeground (s->display, s->gc, s->face->overline_color); 3791
3746 XFillRectangle (s->display, s->window, s->gc, s->x, s->y + dy, 3792 if (s->face->strike_through_color_defaulted_p)
3747 s->width, h); 3793 XFillRectangle (s->display, s->window, s->gc, s->x, s->y + dy,
3748 XSetForeground (s->display, s->gc, xgcv.foreground); 3794 s->width, h);
3795 else
3796 {
3797 XGCValues xgcv;
3798 XGetGCValues (s->display, s->gc, GCForeground, &xgcv);
3799 XSetForeground (s->display, s->gc, s->face->strike_through_color);
3800 XFillRectangle (s->display, s->window, s->gc, s->x, s->y + dy,
3801 s->width, h);
3802 XSetForeground (s->display, s->gc, xgcv.foreground);
3803 }
3749 } 3804 }
3750 }
3751 3805
3752 /* Draw strike-through. */ 3806 /* Draw relief. */
3753 if (s->face->strike_through_p) 3807 if (s->face->box != FACE_NO_BOX)
3754 { 3808 x_draw_glyph_string_box (s);
3755 unsigned long h = 1; 3809 }
3756 unsigned long dy = (s->height - h) / 2;
3757
3758 if (s->face->strike_through_color_defaulted_p)
3759 XFillRectangle (s->display, s->window, s->gc, s->x, s->y + dy,
3760 s->width, h);
3761 else
3762 {
3763 XGCValues xgcv;
3764 XGetGCValues (s->display, s->gc, GCForeground, &xgcv);
3765 XSetForeground (s->display, s->gc, s->face->strike_through_color);
3766 XFillRectangle (s->display, s->window, s->gc, s->x, s->y + dy,
3767 s->width, h);
3768 XSetForeground (s->display, s->gc, xgcv.foreground);
3769 }
3770 }
3771
3772 /* Draw relief. */
3773 if (s->face->box != FACE_NO_BOX)
3774 x_draw_glyph_string_box (s);
3775 3810
3776 /* Reset clipping. */ 3811 /* Reset clipping. */
3777 XSetClipMask (s->display, s->gc, None); 3812 XSetClipMask (s->display, s->gc, None);
3778 } 3813 }
3779 3814
3795 }; 3830 };
3796 3831
3797 3832
3798 static void x_fill_composite_glyph_string P_ ((struct glyph_string *, 3833 static void x_fill_composite_glyph_string P_ ((struct glyph_string *,
3799 int, struct work **, 3834 int, struct work **,
3800 struct work **)); 3835 struct work **, int));
3801 3836
3802 3837
3803 /* Load glyph string S with information from the top of *STACK for a 3838 /* Load glyph string S with information from the top of *STACK for a
3804 composite character. FACE_ID is the id of the face in which S is 3839 composite character. FACE_ID is the id of the face in which S is
3805 drawn. *NEW is a pointer to a struct work not on the stack, that 3840 drawn. *NEW is a pointer to a struct work not on the stack, that
3806 can be used if this function needs to push a new structure on the 3841 can be used if this function needs to push a new structure on the
3807 stack. If it uses it, *NEW is set to null. */ 3842 stack. If it uses it, *NEW is set to null. OVERLAPS_P non-zero
3843 means S should draw the foreground only, and use its lines physical
3844 height for clipping. */
3808 3845
3809 static void 3846 static void
3810 x_fill_composite_glyph_string (s, face_id, stack, new) 3847 x_fill_composite_glyph_string (s, face_id, stack, new, overlaps_p)
3811 struct glyph_string *s; 3848 struct glyph_string *s;
3812 int face_id; 3849 int face_id;
3813 struct work **stack, **new; 3850 struct work **stack, **new;
3851 int overlaps_p;
3814 { 3852 {
3815 int i, c; 3853 int i, c;
3816 struct work *work; 3854 struct work *work;
3817 3855
3818 xassert (s && *new && *stack); 3856 xassert (s && *new && *stack);
3819 3857
3858 s->for_overlaps_p = 1;
3859
3820 /* Pop the work stack. */ 3860 /* Pop the work stack. */
3821 work = *stack; 3861 work = *stack;
3822 *stack = work->next; 3862 *stack = work->next;
3823 3863
3824 /* For all glyphs of cmpcharp->glyph, starting at the offset 3864 /* For all glyphs of cmpcharp->glyph, starting at the offset
3883 } 3923 }
3884 3924
3885 3925
3886 /* Load glyph string S with a sequence of non-composite characters. 3926 /* Load glyph string S with a sequence of non-composite characters.
3887 FACE_ID is the face id of the string. START is the index of the 3927 FACE_ID is the face id of the string. START is the index of the
3888 first glyph to consider, END is the index of the last + 1. Value 3928 first glyph to consider, END is the index of the last + 1.
3889 is the index of the first glyph not in S. */ 3929 OVERLAPS_P non-zero means S should draw the foreground only, and
3930 use its lines physical height for clipping.
3931
3932 Value is the index of the first glyph not in S. */
3890 3933
3891 static int 3934 static int
3892 x_fill_glyph_string (s, face_id, start, end) 3935 x_fill_glyph_string (s, face_id, start, end, overlaps_p)
3893 struct glyph_string *s; 3936 struct glyph_string *s;
3894 int face_id; 3937 int face_id;
3895 int start, end; 3938 int start, end, overlaps_p;
3896 { 3939 {
3897 struct glyph *glyph, *last; 3940 struct glyph *glyph, *last;
3898 int voffset; 3941 int voffset;
3899 3942
3900 xassert (s->charset != CHARSET_COMPOSITION); 3943 xassert (s->charset != CHARSET_COMPOSITION);
3901 xassert (s->f == XFRAME (s->w->frame)); 3944 xassert (s->f == XFRAME (s->w->frame));
3902 xassert (s->nchars == 0); 3945 xassert (s->nchars == 0);
3903 xassert (start >= 0 && end > start); 3946 xassert (start >= 0 && end > start);
3904 3947
3948 s->for_overlaps_p = overlaps_p,
3905 glyph = s->row->glyphs[s->area] + start; 3949 glyph = s->row->glyphs[s->area] + start;
3906 last = s->row->glyphs[s->area] + end; 3950 last = s->row->glyphs[s->area] + end;
3907 voffset = glyph->voffset; 3951 voffset = glyph->voffset;
3908 3952
3909 while (glyph < last 3953 while (glyph < last
3936 s->font = FRAME_FONT (s->f); 3980 s->font = FRAME_FONT (s->f);
3937 } 3981 }
3938 3982
3939 /* Adjust base line for subscript/superscript text. */ 3983 /* Adjust base line for subscript/superscript text. */
3940 s->ybase += voffset; 3984 s->ybase += voffset;
3941 3985
3942 xassert (s->face && s->face->gc); 3986 xassert (s->face && s->face->gc);
3943 return glyph - s->row->glyphs[s->area]; 3987 return glyph - s->row->glyphs[s->area];
3944 } 3988 }
3945 3989
3946 3990
4100 string constructed. HL overrides that face of the glyph; e.g. it 4144 string constructed. HL overrides that face of the glyph; e.g. it
4101 is DRAW_CURSOR if a cursor has to be drawn. LAST_X is the 4145 is DRAW_CURSOR if a cursor has to be drawn. LAST_X is the
4102 right-most x-position of the drawing area. */ 4146 right-most x-position of the drawing area. */
4103 4147
4104 #define BUILD_CHAR_GLYPH_STRINGS(W, ROW, AREA, START, END, HEAD, TAIL, HL, \ 4148 #define BUILD_CHAR_GLYPH_STRINGS(W, ROW, AREA, START, END, HEAD, TAIL, HL, \
4105 X, LAST_X) \ 4149 X, LAST_X, OVERLAPS_P) \
4106 do \ 4150 do \
4107 { \ 4151 { \
4108 int c, charset, face_id; \ 4152 int c, charset, face_id; \
4109 XChar2b *char2b; \ 4153 XChar2b *char2b; \
4110 \ 4154 \
4150 ++n; \ 4194 ++n; \
4151 \ 4195 \
4152 if (new == NULL) \ 4196 if (new == NULL) \
4153 new = (struct work *) alloca (sizeof *new); \ 4197 new = (struct work *) alloca (sizeof *new); \
4154 x_fill_composite_glyph_string (s, face_id, &stack, \ 4198 x_fill_composite_glyph_string (s, face_id, &stack, \
4155 &new); \ 4199 &new, OVERLAPS_P); \
4156 } \ 4200 } \
4157 \ 4201 \
4158 ++START; \ 4202 ++START; \
4159 s = first_s; \ 4203 s = first_s; \
4160 } \ 4204 } \
4164 char2b = (XChar2b *) alloca ((END - START) * sizeof *char2b); \ 4208 char2b = (XChar2b *) alloca ((END - START) * sizeof *char2b); \
4165 x_init_glyph_string (s, char2b, W, ROW, AREA, START, HL); \ 4209 x_init_glyph_string (s, char2b, W, ROW, AREA, START, HL); \
4166 x_append_glyph_string (&HEAD, &TAIL, s); \ 4210 x_append_glyph_string (&HEAD, &TAIL, s); \
4167 s->charset = charset; \ 4211 s->charset = charset; \
4168 s->x = (X); \ 4212 s->x = (X); \
4169 START = x_fill_glyph_string (s, face_id, START, END); \ 4213 START = x_fill_glyph_string (s, face_id, START, END, \
4214 OVERLAPS_P); \
4170 } \ 4215 } \
4171 } \ 4216 } \
4172 while (0) 4217 while (0)
4173 4218
4174 4219
4181 This is an ugly monster macro construct because we must use alloca 4226 This is an ugly monster macro construct because we must use alloca
4182 to allocate glyph strings (because x_draw_glyphs can be called 4227 to allocate glyph strings (because x_draw_glyphs can be called
4183 asynchronously). */ 4228 asynchronously). */
4184 4229
4185 #define BUILD_GLYPH_STRINGS(W, ROW, AREA, START, END, HEAD, TAIL, HL, \ 4230 #define BUILD_GLYPH_STRINGS(W, ROW, AREA, START, END, HEAD, TAIL, HL, \
4186 X, LAST_X) \ 4231 X, LAST_X, OVERLAPS_P) \
4187 do \ 4232 do \
4188 { \ 4233 { \
4189 HEAD = TAIL = NULL; \ 4234 HEAD = TAIL = NULL; \
4190 while (START < END) \ 4235 while (START < END) \
4191 { \ 4236 { \
4192 struct glyph *first_glyph = (ROW)->glyphs[AREA] + START; \ 4237 struct glyph *first_glyph = (ROW)->glyphs[AREA] + START; \
4193 switch (first_glyph->type) \ 4238 switch (first_glyph->type) \
4194 { \ 4239 { \
4195 case CHAR_GLYPH: \ 4240 case CHAR_GLYPH: \
4196 BUILD_CHAR_GLYPH_STRINGS (W, ROW, AREA, START, END, HEAD, \ 4241 BUILD_CHAR_GLYPH_STRINGS (W, ROW, AREA, START, END, HEAD, \
4197 TAIL, HL, X, LAST_X); \ 4242 TAIL, HL, X, LAST_X, \
4243 OVERLAPS_P); \
4198 break; \ 4244 break; \
4199 \ 4245 \
4200 case STRETCH_GLYPH: \ 4246 case STRETCH_GLYPH: \
4201 BUILD_STRETCH_GLYPH_STRING (W, ROW, AREA, START, END, \ 4247 BUILD_STRETCH_GLYPH_STRING (W, ROW, AREA, START, END, \
4202 HEAD, TAIL, HL, X, LAST_X); \ 4248 HEAD, TAIL, HL, X, LAST_X); \
4233 position for display. This can be different from START in case 4279 position for display. This can be different from START in case
4234 overlapping glyphs must be displayed. If REAL_END is non-null, 4280 overlapping glyphs must be displayed. If REAL_END is non-null,
4235 return in *REAL_END the real end position for display. This can be 4281 return in *REAL_END the real end position for display. This can be
4236 different from END in case overlapping glyphs must be displayed. 4282 different from END in case overlapping glyphs must be displayed.
4237 4283
4284 If OVERLAPS_P is non-zero, draw only the foreground of characters
4285 and clip to the physical height of ROW.
4286
4238 Value is the x-position reached, relative to AREA of W. */ 4287 Value is the x-position reached, relative to AREA of W. */
4239 4288
4240 static int 4289 static int
4241 x_draw_glyphs (w, x, row, area, start, end, hl, real_start, real_end) 4290 x_draw_glyphs (w, x, row, area, start, end, hl, real_start, real_end,
4291 overlaps_p)
4242 struct window *w; 4292 struct window *w;
4243 int x; 4293 int x;
4244 struct glyph_row *row; 4294 struct glyph_row *row;
4245 enum glyph_row_area area; 4295 enum glyph_row_area area;
4246 int start, end; 4296 int start, end;
4247 enum draw_glyphs_face hl; 4297 enum draw_glyphs_face hl;
4248 int *real_start, *real_end; 4298 int *real_start, *real_end;
4299 int overlaps_p;
4249 { 4300 {
4250 struct glyph_string *head, *tail; 4301 struct glyph_string *head, *tail;
4251 struct glyph_string *s; 4302 struct glyph_string *s;
4252 int last_x, area_width; 4303 int last_x, area_width;
4253 int x_reached; 4304 int x_reached;
4297 /* Build a doubly-linked list of glyph_string structures between 4348 /* Build a doubly-linked list of glyph_string structures between
4298 head and tail from what we have to draw. Note that the macro 4349 head and tail from what we have to draw. Note that the macro
4299 BUILD_GLYPH_STRINGS will modify its start parameter. That's 4350 BUILD_GLYPH_STRINGS will modify its start parameter. That's
4300 the reason we use a separate variable `i'. */ 4351 the reason we use a separate variable `i'. */
4301 i = start; 4352 i = start;
4302 BUILD_GLYPH_STRINGS (w, row, area, i, end, head, tail, hl, x, last_x); 4353 BUILD_GLYPH_STRINGS (w, row, area, i, end, head, tail, hl, x, last_x,
4354 overlaps_p);
4303 if (tail) 4355 if (tail)
4304 x_reached = tail->x + tail->background_width; 4356 x_reached = tail->x + tail->background_width;
4305 else 4357 else
4306 x_reached = x; 4358 x_reached = x;
4307 4359
4308 /* If there are any glyphs with lbearing < 0 or rbearing > width in 4360 /* If there are any glyphs with lbearing < 0 or rbearing > width in
4309 the row, redraw some glyphs in front or following the glyph 4361 the row, redraw some glyphs in front or following the glyph
4310 strings built above. */ 4362 strings built above. */
4311 if (row->contains_overlapping_glyphs_p) 4363 if (!overlaps_p && row->contains_overlapping_glyphs_p)
4312 { 4364 {
4313 int dummy_x = 0; 4365 int dummy_x = 0;
4314 struct glyph_string *h, *t; 4366 struct glyph_string *h, *t;
4315 4367
4316 /* Compute overhangs for all glyph strings. */ 4368 /* Compute overhangs for all glyph strings. */
4325 i = x_left_overwritten (head); 4377 i = x_left_overwritten (head);
4326 if (i >= 0) 4378 if (i >= 0)
4327 { 4379 {
4328 j = i; 4380 j = i;
4329 BUILD_GLYPH_STRINGS (w, row, area, j, start, h, t, 4381 BUILD_GLYPH_STRINGS (w, row, area, j, start, h, t,
4330 DRAW_NORMAL_TEXT, dummy_x, last_x); 4382 DRAW_NORMAL_TEXT, dummy_x, last_x,
4383 overlaps_p);
4331 start = i; 4384 start = i;
4332 if (real_start) 4385 if (real_start)
4333 *real_start = start; 4386 *real_start = start;
4334 x_compute_overhangs_and_x (t, head->x, 1); 4387 x_compute_overhangs_and_x (t, head->x, 1);
4335 x_prepend_glyph_string_lists (&head, &tail, h, t); 4388 x_prepend_glyph_string_lists (&head, &tail, h, t);
4344 strings exist. */ 4397 strings exist. */
4345 i = x_left_overwriting (head); 4398 i = x_left_overwriting (head);
4346 if (i >= 0) 4399 if (i >= 0)
4347 { 4400 {
4348 BUILD_GLYPH_STRINGS (w, row, area, i, start, h, t, 4401 BUILD_GLYPH_STRINGS (w, row, area, i, start, h, t,
4349 DRAW_NORMAL_TEXT, dummy_x, last_x); 4402 DRAW_NORMAL_TEXT, dummy_x, last_x,
4403 overlaps_p);
4350 for (s = h; s; s = s->next) 4404 for (s = h; s; s = s->next)
4351 s->background_filled_p = 1; 4405 s->background_filled_p = 1;
4352 if (real_start) 4406 if (real_start)
4353 *real_start = i; 4407 *real_start = i;
4354 x_compute_overhangs_and_x (t, head->x, 1); 4408 x_compute_overhangs_and_x (t, head->x, 1);
4361 over it. */ 4415 over it. */
4362 i = x_right_overwritten (tail); 4416 i = x_right_overwritten (tail);
4363 if (i >= 0) 4417 if (i >= 0)
4364 { 4418 {
4365 BUILD_GLYPH_STRINGS (w, row, area, end, i, h, t, 4419 BUILD_GLYPH_STRINGS (w, row, area, end, i, h, t,
4366 DRAW_NORMAL_TEXT, x, last_x); 4420 DRAW_NORMAL_TEXT, x, last_x,
4421 overlaps_p);
4367 x_compute_overhangs_and_x (h, tail->x + tail->width, 0); 4422 x_compute_overhangs_and_x (h, tail->x + tail->width, 0);
4368 x_append_glyph_string_lists (&head, &tail, h, t); 4423 x_append_glyph_string_lists (&head, &tail, h, t);
4369 if (real_end) 4424 if (real_end)
4370 *real_end = i; 4425 *real_end = i;
4371 } 4426 }
4377 paint over the foreground of following glyphs. */ 4432 paint over the foreground of following glyphs. */
4378 i = x_right_overwriting (tail); 4433 i = x_right_overwriting (tail);
4379 if (i >= 0) 4434 if (i >= 0)
4380 { 4435 {
4381 BUILD_GLYPH_STRINGS (w, row, area, end, i, h, t, 4436 BUILD_GLYPH_STRINGS (w, row, area, end, i, h, t,
4382 DRAW_NORMAL_TEXT, x, last_x); 4437 DRAW_NORMAL_TEXT, x, last_x,
4438 overlaps_p);
4383 for (s = h; s; s = s->next) 4439 for (s = h; s; s = s->next)
4384 s->background_filled_p = 1; 4440 s->background_filled_p = 1;
4385 x_compute_overhangs_and_x (h, tail->x + tail->width, 0); 4441 x_compute_overhangs_and_x (h, tail->x + tail->width, 0);
4386 x_append_glyph_string_lists (&head, &tail, h, t); 4442 x_append_glyph_string_lists (&head, &tail, h, t);
4387 if (real_end) 4443 if (real_end)
4405 } 4461 }
4406 return x_reached; 4462 return x_reached;
4407 } 4463 }
4408 4464
4409 4465
4466 /* Fix the display of area AREA of overlapping row ROW in window W. */
4467
4468 static void
4469 x_fix_overlapping_area (w, row, area)
4470 struct window *w;
4471 struct glyph_row *row;
4472 enum glyph_row_area area;
4473 {
4474 int i, x;
4475
4476 BLOCK_INPUT;
4477
4478 if (area == LEFT_MARGIN_AREA)
4479 x = 0;
4480 else if (area == TEXT_AREA)
4481 x = row->x + window_box_width (w, LEFT_MARGIN_AREA);
4482 else
4483 x = (window_box_width (w, LEFT_MARGIN_AREA)
4484 + window_box_width (w, TEXT_AREA));
4485
4486 for (i = 0; i < row->used[area];)
4487 {
4488 if (row->glyphs[area][i].overlaps_vertically_p)
4489 {
4490 int start = i, start_x = x;
4491
4492 do
4493 {
4494 x += row->glyphs[area][i].pixel_width;
4495 ++i;
4496 }
4497 while (i < row->used[area]
4498 && row->glyphs[area][i].overlaps_vertically_p);
4499
4500 x_draw_glyphs (w, start_x, row, area, start, i,
4501 (row->inverse_p
4502 ? DRAW_INVERSE_VIDEO : DRAW_NORMAL_TEXT),
4503 NULL, NULL, 1);
4504 }
4505 else
4506 {
4507 x += row->glyphs[area][i].pixel_width;
4508 ++i;
4509 }
4510 }
4511
4512 UNBLOCK_INPUT;
4513 }
4514
4515
4410 /* Output LEN glyphs starting at START at the nominal cursor position. 4516 /* Output LEN glyphs starting at START at the nominal cursor position.
4411 Advance the nominal cursor over the text. The global variable 4517 Advance the nominal cursor over the text. The global variable
4412 updated_window contains the window being updated, updated_row is 4518 updated_window contains the window being updated, updated_row is
4413 the glyph row being updated, and updated_area is the area of that 4519 the glyph row being updated, and updated_area is the area of that
4414 row being updated. */ 4520 row being updated. */
4429 x = x_draw_glyphs (updated_window, output_cursor.x, 4535 x = x_draw_glyphs (updated_window, output_cursor.x,
4430 updated_row, updated_area, 4536 updated_row, updated_area,
4431 hpos, hpos + len, 4537 hpos, hpos + len,
4432 (updated_row->inverse_p 4538 (updated_row->inverse_p
4433 ? DRAW_INVERSE_VIDEO : DRAW_NORMAL_TEXT), 4539 ? DRAW_INVERSE_VIDEO : DRAW_NORMAL_TEXT),
4434 &real_start, &real_end); 4540 &real_start, &real_end, 0);
4435 4541
4436 /* If we drew over the cursor, note that it is not visible any more. */ 4542 /* If we drew over the cursor, note that it is not visible any more. */
4437 note_overwritten_text_cursor (updated_window, real_start, 4543 note_overwritten_text_cursor (updated_window, real_start,
4438 real_end - real_start); 4544 real_end - real_start);
4439 4545
4488 frame_x + shift_by_width, frame_y); 4594 frame_x + shift_by_width, frame_y);
4489 4595
4490 /* Write the glyphs. */ 4596 /* Write the glyphs. */
4491 hpos = start - row->glyphs[updated_area]; 4597 hpos = start - row->glyphs[updated_area];
4492 x_draw_glyphs (w, output_cursor.x, row, updated_area, hpos, hpos + len, 4598 x_draw_glyphs (w, output_cursor.x, row, updated_area, hpos, hpos + len,
4493 DRAW_NORMAL_TEXT, &real_start, &real_end); 4599 DRAW_NORMAL_TEXT, &real_start, &real_end, 0);
4494 note_overwritten_text_cursor (w, real_start, real_end - real_start); 4600 note_overwritten_text_cursor (w, real_start, real_end - real_start);
4495 4601
4496 /* Advance the output cursor. */ 4602 /* Advance the output cursor. */
4497 output_cursor.hpos += len; 4603 output_cursor.hpos += len;
4498 output_cursor.x += shift_by_width; 4604 output_cursor.x += shift_by_width;
5089 if (last > first) 5195 if (last > first)
5090 x_draw_glyphs (w, first_x, row, area, 5196 x_draw_glyphs (w, first_x, row, area,
5091 first - row->glyphs[area], 5197 first - row->glyphs[area],
5092 last - row->glyphs[area], 5198 last - row->glyphs[area],
5093 row->inverse_p ? DRAW_INVERSE_VIDEO : DRAW_NORMAL_TEXT, 5199 row->inverse_p ? DRAW_INVERSE_VIDEO : DRAW_NORMAL_TEXT,
5094 NULL, NULL); 5200 NULL, NULL, 0);
5095 } 5201 }
5096 5202
5097 5203
5098 /* Redraw the parts of the glyph row ROW on window W intersecting 5204 /* Redraw the parts of the glyph row ROW on window W intersecting
5099 rectangle R. R is in window-relative coordinates. */ 5205 rectangle R. R is in window-relative coordinates. */
5107 xassert (row->enabled_p); 5213 xassert (row->enabled_p);
5108 5214
5109 if (row->mode_line_p || w->pseudo_window_p) 5215 if (row->mode_line_p || w->pseudo_window_p)
5110 x_draw_glyphs (w, 0, row, TEXT_AREA, 0, row->used[TEXT_AREA], 5216 x_draw_glyphs (w, 0, row, TEXT_AREA, 0, row->used[TEXT_AREA],
5111 row->inverse_p ? DRAW_INVERSE_VIDEO : DRAW_NORMAL_TEXT, 5217 row->inverse_p ? DRAW_INVERSE_VIDEO : DRAW_NORMAL_TEXT,
5112 NULL, NULL); 5218 NULL, NULL, 0);
5113 else 5219 else
5114 { 5220 {
5115 if (row->used[LEFT_MARGIN_AREA]) 5221 if (row->used[LEFT_MARGIN_AREA])
5116 expose_area (w, row, r, LEFT_MARGIN_AREA); 5222 expose_area (w, row, r, LEFT_MARGIN_AREA);
5117 if (row->used[TEXT_AREA]) 5223 if (row->used[TEXT_AREA])
6581 cursor_off_p = 1; 6687 cursor_off_p = 1;
6582 } 6688 }
6583 6689
6584 if (end_hpos > start_hpos) 6690 if (end_hpos > start_hpos)
6585 x_draw_glyphs (w, start_x, row, updated_area, 6691 x_draw_glyphs (w, start_x, row, updated_area,
6586 start_hpos, end_hpos, draw, NULL, NULL); 6692 start_hpos, end_hpos, draw, NULL, NULL, 0);
6587 } 6693 }
6588 6694
6589 /* If we turned the cursor off, turn it back on. */ 6695 /* If we turned the cursor off, turn it back on. */
6590 if (cursor_off_p) 6696 if (cursor_off_p)
6591 x_display_cursor (w, 1, 6697 x_display_cursor (w, 1,
9769 { 9875 {
9770 /* If cursor hpos is out of bounds, don't draw garbage. This can 9876 /* If cursor hpos is out of bounds, don't draw garbage. This can
9771 happen in mini-buffer windows when switching between echo area 9877 happen in mini-buffer windows when switching between echo area
9772 glyphs and mini-buffer. */ 9878 glyphs and mini-buffer. */
9773 if (w->phys_cursor.hpos < row->used[TEXT_AREA]) 9879 if (w->phys_cursor.hpos < row->used[TEXT_AREA])
9774 x_draw_glyphs (w, w->phys_cursor.x, row, TEXT_AREA, 9880 {
9775 w->phys_cursor.hpos, w->phys_cursor.hpos + 1, hl, 0, 0); 9881 x_draw_glyphs (w, w->phys_cursor.x, row, TEXT_AREA,
9882 w->phys_cursor.hpos, w->phys_cursor.hpos + 1,
9883 hl, 0, 0, 0);
9884
9885 /* When we erase the cursor, and ROW is overlapped by other
9886 rows, make sure that these overlapping parts of other rows
9887 are redrawn. */
9888 if (hl == DRAW_NORMAL_TEXT && row->overlapped_p)
9889 {
9890 if (row > w->current_matrix->rows
9891 && MATRIX_ROW_OVERLAPS_SUCC_P (row - 1))
9892 x_fix_overlapping_area (w, row - 1, TEXT_AREA);
9893
9894 if (MATRIX_ROW_BOTTOM_Y (row) < window_text_bottom_y (w)
9895 && MATRIX_ROW_OVERLAPS_PRED_P (row + 1))
9896 x_fix_overlapping_area (w, row + 1, TEXT_AREA);
9897 }
9898 }
9776 } 9899 }
9777 9900
9778 9901
9779 /* Erase the image of a cursor of window W from the screen. */ 9902 /* Erase the image of a cursor of window W from the screen. */
9780 9903
12617 x_after_update_window_line, 12740 x_after_update_window_line,
12618 x_update_window_begin, 12741 x_update_window_begin,
12619 x_update_window_end, 12742 x_update_window_end,
12620 XTcursor_to, 12743 XTcursor_to,
12621 x_flush, 12744 x_flush,
12622 x_get_glyph_overhangs 12745 x_get_glyph_overhangs,
12746 x_fix_overlapping_area
12623 }; 12747 };
12624 12748
12625 void 12749 void
12626 x_initialize () 12750 x_initialize ()
12627 { 12751 {