aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPřemysl Eric Janouch <p@janouch.name>2022-10-30 18:49:10 +0100
committerPřemysl Eric Janouch <p@janouch.name>2022-10-30 18:49:10 +0100
commit61fac878add8392928c46a750cbd1efce0d0982e (patch)
treebfe5fa210b7d39b72651110931a3268ca2ae9aa3
parentda83dbee1f9e5b279cde7b3c862eec3583c076ad (diff)
downloadnncmpp-61fac878add8392928c46a750cbd1efce0d0982e.tar.gz
nncmpp-61fac878add8392928c46a750cbd1efce0d0982e.tar.xz
nncmpp-61fac878add8392928c46a750cbd1efce0d0982e.zip
X11: fix rendering of overflowing last list items
-rw-r--r--nncmpp.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/nncmpp.c b/nncmpp.c
index 94f5847..ef49c08 100644
--- a/nncmpp.c
+++ b/nncmpp.c
@@ -6248,7 +6248,8 @@ static void
x11_render_list (struct widget *self)
{
// We could do that for all widgets, but it would be kind-of pointless.
- XRenderSetPictureClipRectangles (g.dpy, g.x11_pixmap_picture, 0, 0,
+ // We need to go through Xft, or XftTextRenderUtf8() might skip glyphs.
+ XftDrawSetClipRectangles (g.xft_draw, 0, 0,
&(XRectangle) { self->x, self->y, self->width, self->height }, 1);
x11_render_padding (self);
@@ -6258,8 +6259,7 @@ x11_render_list (struct widget *self)
free (w);
}
- XRenderChangePicture (g.dpy, g.x11_pixmap_picture, CPClipMask,
- &(XRenderPictureAttributes) { .clip_mask = None });
+ XftDrawSetClip (g.xft_draw, None);
}
static struct widget *