commit bcfa5b9b7f72ef7ef15ac3375bf6ef32b1f04fc2
parent bdeb1e7c4c63ad278dd4b2f8fd6fccb7651c3e6f
Author: Bakkeby <bakkeby@gmail.com>
Date: Thu, 11 Aug 2022 15:56:36 +0200
wide glyphs: adding alternative patch ref. #56
Diffstat:
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/x.c b/x.c
@@ -1837,9 +1837,7 @@ xdrawglyphfontspecs(const XftGlyphFontSpec *specs, Glyph base, int len, int x, i
int width = charlen * win.cw;
Color *fg, *bg, *temp, revfg, revbg, truefg, truebg;
XRenderColor colfg, colbg;
- #if !WIDE_GLYPHS_PATCH
XRectangle r;
- #endif // WIDE_GLYPHS_PATCH
/* Fallback on color display for attributes not supported by the font */
if (base.mode & ATTR_ITALIC && base.mode & ATTR_BOLD) {
@@ -1992,18 +1990,22 @@ xdrawglyphfontspecs(const XftGlyphFontSpec *specs, Glyph base, int len, int x, i
xclear(winx, winy, winx + width, winy + win.ch);
else
#endif // BACKGROUND_IMAGE_PATCH
+
+ #if !WIDE_GLYPHS_PATCH
XftDrawRect(xw.draw, bg, winx, winy, width, win.ch);
- #if WIDE_GLYPHS_PATCH
- }
#endif // WIDE_GLYPHS_PATCH
- #if !WIDE_GLYPHS_PATCH
/* Set the clip region because Xft is sometimes dirty. */
r.x = 0;
r.y = 0;
r.height = win.ch;
r.width = width;
XftDrawSetClipRectangles(xw.draw, winx, winy, &r, 1);
+
+ #if WIDE_GLYPHS_PATCH
+ /* Fill the background */
+ XftDrawRect(xw.draw, bg, winx, winy, width, win.ch);
+ }
#endif // WIDE_GLYPHS_PATCH
#if WIDE_GLYPHS_PATCH
@@ -2421,10 +2423,8 @@ xdrawglyphfontspecs(const XftGlyphFontSpec *specs, Glyph base, int len, int x, i
}
#endif // OPENURLONCLICK_PATCH
- #if !WIDE_GLYPHS_PATCH
/* Reset clip to none. */
XftDrawSetClip(xw.draw, 0);
- #endif // WIDE_GLYPHS_PATCH
}
void