From bca86276e7113584c839481cb559860e3d151ca1 Mon Sep 17 00:00:00 2001 From: bakkeby Date: Sun, 14 Jun 2020 20:04:27 +0200 Subject: [PATCH] Adding w3m patch --- README.md | 5 +++++ patches.def.h | 8 ++++++-- x.c | 4 ++++ 3 files changed, 15 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 3972e10..388830a 100644 --- a/README.md +++ b/README.md @@ -15,6 +15,8 @@ Refer to [https://st.suckless.org/](https://st.suckless.org/) for details on the ### Changelog: +2020-06-14 - Added w3m patch + 2020-06-10 - Upgrade to 249ef9, 2020-06-01 2020-06-05 - Added the ligatures patch @@ -132,6 +134,9 @@ Refer to [https://st.suckless.org/](https://st.suckless.org/) for details on the - [~visualbell~](https://st.suckless.org/patches/visualbell/) - ~adds visual indicators for the terminal bell event~ + - [w3m](https://st.suckless.org/patches/w3m/) + - adds support for w3m images + - [workingdir](https://st.suckless.org/patches/workingdir/) - allows user to specify the initial path st should use as the working directory diff --git a/patches.def.h b/patches.def.h index fc279bf..2634cf9 100644 --- a/patches.def.h +++ b/patches.def.h @@ -199,12 +199,16 @@ */ #define THEMED_CURSOR_PATCH 0 -/* - * Vertically center lines in the space available if you have set a larger chscale in config.h +/* Vertically center lines in the space available if you have set a larger chscale in config.h * https://st.suckless.org/patches/vertcenter/ */ #define VERTCENTER_PATCH 0 +/* Adds support for w3m images. + * https://st.suckless.org/patches/w3m/ + */ +#define W3M_PATCH 0 + /* This patch allows user to specify the initial path st should use as the working directory. * https://st.suckless.org/patches/workingdir/ */ diff --git a/x.c b/x.c index 6a5e5d3..1f4114c 100644 --- a/x.c +++ b/x.c @@ -1954,6 +1954,10 @@ xsettitle(char *p) int xstartdraw(void) { + #if W3M_PATCH + if (IS_SET(MODE_VISIBLE)) + XCopyArea(xw.dpy, xw.win, xw.buf, dc.gc, 0, 0, win.w, win.h, 0, 0); + #endif // W3M_PATCH return IS_SET(MODE_VISIBLE); }