st

My custom build of st terminal.
git clone https://git.mtkn.jp/st
Log | Files | Refs | README | LICENSE

st-w3m-0.8.3.diff (1347B)


      1 From 69cffc587b54b0a9cd81adb87abad8e526d5b25b Mon Sep 17 00:00:00 2001
      2 From: "Avi Halachmi (:avih)" <avihpit@yahoo.com>
      3 Date: Thu, 4 Jun 2020 17:35:08 +0300
      4 Subject: [PATCH] support w3m images
      5 
      6 w3m images are a hack which renders on top of the terminal's drawable,
      7 which didn't work in st because when using double buffering, the front
      8 buffer (on which w3m draws its images) is ignored, and st draws only
      9 on the back buffer, which is then copied to the front buffer.
     10 
     11 There's a patch to make it work at the FAQ already, but that patch
     12 canceles double-buffering, which can have negative side effects on
     13 some cases such as flickering.
     14 
     15 This patch achieves the same goal but instead of canceling the double
     16 buffer it first copies the front buffer to the back buffer.
     17 
     18 This has the same issues as the FAQ patch in that the cursor line is
     19 deleted at the image (because st renders always full lines), but
     20 otherwise it's simpler and does keeps double buffering.
     21 ---
     22  x.c | 2 ++
     23  1 file changed, 2 insertions(+)
     24 
     25 diff --git a/x.c b/x.c
     26 index e5f1737..b6ae162 100644
     27 --- a/x.c
     28 +++ b/x.c
     29 @@ -1594,6 +1594,8 @@ xsettitle(char *p)
     30  int
     31  xstartdraw(void)
     32  {
     33 +	if (IS_SET(MODE_VISIBLE))
     34 +		XCopyArea(xw.dpy, xw.win, xw.buf, dc.gc, 0, 0, win.w, win.h, 0, 0);
     35  	return IS_SET(MODE_VISIBLE);
     36  }
     37  
     38 
     39 base-commit: 43a395ae91f7d67ce694e65edeaa7bbc720dd027
     40 -- 
     41 2.17.1
     42