summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAmbrose <me@librelife.org>2026-02-15 16:41:46 -0500
committerAmbrose <me@librelife.org>2026-02-15 16:41:46 -0500
commit57882154d4e766369c05c3eed9bdd782df461959 (patch)
tree808b8aeb736d2925b96bb25d77c156fe23afbf7d
parentee7c8b823495bddacfd473c79a9fa7d0253ff875 (diff)
Linked to w3m patch
-rw-r--r--README.md1
-rw-r--r--patches/st-w3m-0.8.3.diff42
2 files changed, 43 insertions, 0 deletions
diff --git a/README.md b/README.md
index 5c0bfcc..9be1a3e 100644
--- a/README.md
+++ b/README.md
@@ -8,6 +8,7 @@
- [alpha](https://st.suckless.org/patches/alpha/).
- [scrollback](https://st.suckless.org/patches/scrollback/).
- [xresources](https://st.suckless.org/patches/xresources/)
+- [w3m images](https://st.suckless.org/patches/w3m/)
## Plans:
diff --git a/patches/st-w3m-0.8.3.diff b/patches/st-w3m-0.8.3.diff
new file mode 100644
index 0000000..a4e104b
--- /dev/null
+++ b/patches/st-w3m-0.8.3.diff
@@ -0,0 +1,42 @@
+From 69cffc587b54b0a9cd81adb87abad8e526d5b25b Mon Sep 17 00:00:00 2001
+From: "Avi Halachmi (:avih)" <avihpit@yahoo.com>
+Date: Thu, 4 Jun 2020 17:35:08 +0300
+Subject: [PATCH] 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.
+---
+ x.c | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/x.c b/x.c
+index e5f1737..b6ae162 100644
+--- a/x.c
++++ b/x.c
+@@ -1594,6 +1594,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);
+ }
+
+
+base-commit: 43a395ae91f7d67ce694e65edeaa7bbc720dd027
+--
+2.17.1
+