Support w3m images - st - personal variant of st
 (HTM) git clone https://git.drkhsh.at/st.git
 (DIR) Log
 (DIR) Files
 (DIR) Refs
 (DIR) README
 (DIR) LICENSE
       ---
 (DIR) commit 23bc55144aaaa98cabd2c75bcc2310c5966a6a5b
 (DIR) parent b6e2831abe50721193d6e1c4d9f79b71001259b7
 (HTM) Author: drkhsh <me@drkhsh.at>
       Date:   Wed, 10 Jan 2024 10:11:26 +0100
       
       Support w3m images
       
       w3m images are a hack which renders on top of the terminal's drawable,
       which didn't work in st because when using double buffering, the front
       buffer (on which w3m draws its images) is ignored, and st draws only
       on the back buffer, which is then copied to the front buffer.
       
       There's a patch to make it work at the FAQ already, but that patch
       canceles double-buffering, which can have negative side effects on
       some cases such as flickering.
       
       This patch achieves the same goal but instead of canceling the double
       buffer it first copies the front buffer to the back buffer.
       
       This has the same issues as the FAQ patch in that the cursor line is
       deleted at the image (because st renders always full lines), but
       otherwise it's simpler and does keeps double buffering.
       
       https://st.suckless.org/patches/w3m/
       
       Diffstat:
         M x.c                                 |       2 ++
       
       1 file changed, 2 insertions(+), 0 deletions(-)
       ---
 (DIR) diff --git a/x.c b/x.c
       @@ -1636,6 +1636,8 @@ xsettitle(char *p)
        int
        xstartdraw(void)
        {
       +        if (IS_SET(MODE_VISIBLE))
       +                XCopyArea(xw.dpy, xw.win, xw.buf, dc.gc, 0, 0, win.w, win.h, 0, 0);
                return IS_SET(MODE_VISIBLE);
        }