tRemoving the overdrawing of some fonts. - st - [fork] customized build of st, … | |
git clone git://src.adamsgaard.dk/st | |
Log | |
Files | |
Refs | |
README | |
LICENSE | |
--- | |
commit db6f796ecfafcee879613b60a772be3e5d9e355e | |
parent 7ea68632081e5adc2f0d2681ac89ed5decfac7b9 | |
Author: Christoph Lohmann <[email protected]> | |
Date: Tue, 23 Apr 2013 19:17:50 +0200 | |
Removing the overdrawing of some fonts. | |
Diffstat: | |
M st.c | 11 +++++++++++ | |
1 file changed, 11 insertions(+), 0 deletions(-) | |
--- | |
diff --git a/st.c b/st.c | |
t@@ -36,6 +36,7 @@ char *argv0; | |
#define Draw XftDraw * | |
#define Colour XftColor | |
#define Colourmap Colormap | |
+#define Rectangle XRectangle | |
#if defined(__linux) | |
#include <pty.h> | |
t@@ -2764,6 +2765,7 @@ xdraws(char *s, Glyph base, int x, int y, int charlen, i… | |
FcCharSet *fccharset; | |
Colour *fg, *bg, *temp, revfg, revbg; | |
XRenderColor colfg, colbg; | |
+ Rectangle r; | |
frcflags = FRC_NORMAL; | |
t@@ -2851,6 +2853,11 @@ xdraws(char *s, Glyph base, int x, int y, int charlen, … | |
/* Clean up the region we want to draw to. */ | |
XftDrawRect(xw.draw, bg, winx, winy, width, xw.ch); | |
+ r.x = 0; | |
+ r.y = 0; | |
+ r.height = xw.ch; | |
+ r.width = width; | |
+ XftDrawSetClipRectangles(xw.draw, winx, winy, &r, 1); | |
fcsets[0] = font->set; | |
for(xp = winx; bytelen > 0;) { | |
t@@ -2885,6 +2892,7 @@ xdraws(char *s, Glyph base, int x, int y, int charlen, i… | |
(FcChar8 *)u8fs, | |
u8fblen); | |
xp += font->width * u8fl; | |
+ | |
} | |
break; | |
} | |
t@@ -2969,6 +2977,9 @@ xdraws(char *s, Glyph base, int x, int y, int charlen, i… | |
XftDrawRect(xw.draw, fg, winx, winy + font->ascent + 1, | |
width, 1); | |
} | |
+ | |
+ /* Reset clip to none. */ | |
+ XftDrawSetClip(xw.draw, 0); | |
} | |
void |