st-flexipatch

My st-flexipatch configuration
git clone git://git.ethandl.dev/st-flexipatch
Log | Files | Refs | README | LICENSE

commit df36caf56bae629044249c4ee3a4468f6418606f
parent 6e962cc929455bcbba4b50348ad67f41d09a9cc2
Author: Stein Gunnar Bakkeby <bakkeby@gmail.com>
Date:   Fri, 10 Jun 2022 13:46:42 +0200

Merge pull request #68 from veltza/fix-flickering-sixels

Fix flickering when sixel images are moving
Diffstat:
Mx.c | 23+++++++----------------
1 file changed, 7 insertions(+), 16 deletions(-)

diff --git a/x.c b/x.c @@ -2744,22 +2744,10 @@ xfinishdraw(void) { #if SIXEL_PATCH ImageList *im; - int x, y; - int n = 0; - int nlimit = 256; - XRectangle *rects = NULL; XGCValues gcvalues; GC gc; #endif // SIXEL_PATCH - #if !SINGLE_DRAWABLE_BUFFER_PATCH - XCopyArea(xw.dpy, xw.buf, xw.win, dc.gc, 0, 0, win.w, - win.h, 0, 0); - #endif // SINGLE_DRAWABLE_BUFFER_PATCH - XSetForeground(xw.dpy, dc.gc, - dc.col[IS_SET(MODE_REVERSE)? - defaultfg : defaultbg].pixel); - #if SIXEL_PATCH for (im = term.images; im; im = im->next) { if (term.images == NULL) { @@ -2810,7 +2798,6 @@ xfinishdraw(void) im->pixels = NULL; } - n = 0; memset(&gcvalues, 0, sizeof(gcvalues)); gc = XCreateGC(xw.dpy, xw.win, 0, &gcvalues); @@ -2822,10 +2809,14 @@ xfinishdraw(void) XFreeGC(xw.dpy, gc); } - - free(rects); - drawregion(0, 0, term.col, term.row); #endif // SIXEL_PATCH + + #if !SINGLE_DRAWABLE_BUFFER_PATCH + XCopyArea(xw.dpy, xw.buf, xw.win, dc.gc, 0, 0, win.w, win.h, 0, 0); + #endif // SINGLE_DRAWABLE_BUFFER_PATCH + XSetForeground(xw.dpy, dc.gc, + dc.col[IS_SET(MODE_REVERSE)? + defaultfg : defaultbg].pixel); } void