[wiki] [sites] [dwm][patch] Fix transparent borders || szatanjl

From: <git_AT_suckless.org>
Date: Tue, 12 May 2020 10:39:29 +0200

commit cef6cf5a871e2d53296b9cda28959a6548f98a0c
Author: szatanjl <szatan_AT_gecc.xyz>
Date: Tue May 12 10:37:22 2020 +0200

    [dwm][patch] Fix transparent borders

diff --git a/dwm.suckless.org/patches/alpha/dwm-fixborders-6.2.diff b/dwm.suckless.org/patches/alpha/dwm-fixborders-6.2.diff
new file mode 100644
index 00000000..0a17b9e7
--- /dev/null
+++ b/dwm.suckless.org/patches/alpha/dwm-fixborders-6.2.diff
_AT_@ -0,0 +1,27 @@
+From 1529909466206016f2101457bbf37c67195714c8 Mon Sep 17 00:00:00 2001
+From: Jakub Leszczak <szatan_AT_gecc.xyz>
+Date: Fri, 22 Nov 2019 10:46:53 +0800
+Subject: [PATCH] Fix transparent borders
+
+When terminal has transparency then its borders also become transparent.
+Fix it by removing transparency from any pixels drawn.
+---
+ drw.c | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/drw.c b/drw.c
+index 8fd1ca4..490a592 100644
+--- a/drw.c
++++ b/drw.c
+_AT_@ -202,6 +202,8 @@ drw_clr_create(Drw *drw, Clr *dest, const char *clrname)
+ DefaultColormap(drw->dpy, drw->screen),
+ clrname, dest))
+ die("error, cannot allocate color '%s'", clrname);
++
++ dest->pixel |= 0xff << 24;
+ }
+
+ /* Wrapper to create color schemes. The caller has to call free(3) on the
+--
+2.26.2
+
diff --git a/dwm.suckless.org/patches/alpha/index.md b/dwm.suckless.org/patches/alpha/index.md
index b518eeb6..56a5c24f 100644
--- a/dwm.suckless.org/patches/alpha/index.md
+++ b/dwm.suckless.org/patches/alpha/index.md
_AT_@ -8,13 +8,25 @@ Description
 Allow dwm to have translucent bars, while keeping all the text on it opaque,
 just like the [alpha-patch for st](//st.suckless.org/patches/alpha/).
 
+### Fix transparent borders
+
+By default dwm might make windows' borders transparent when using
+composit window manager (e.g. xcompmgr, picom). Alpha patch allows to
+make borders opaque.
+
+If all you want is to make borders opaque, you don't care about
+statusbar opacity and/or have problems applying alpha patch, then you
+might use fixborders patch instead.
+
 Download
 --------
 * [dwm-alpha-6.1.diff](dwm-alpha-6.1.diff)
 * [dwm-alpha-20180613-b69c870.diff](dwm-alpha-20180613-b69c870.diff)
+* [dwm-fixborders-6.2.diff](dwm-fixborders-6.2.diff)
 
 Authors
 -------
 * Eon S. Jeon - <esjeon_AT_hyunmu.am>
 * Laslo Hunhold - <dev_AT_frign.de> (6.1 port)
 * Thomas Oltmann - <thomas.oltmann.hhg_AT_gmail.com> (20180613-b69c870 port)
+* Jakub Leszczak - <szatan_AT_gecc.xyz> (fixborders patch)
Received on Tue May 12 2020 - 10:39:29 CEST

This archive was generated by hypermail 2.3.0 : Tue May 12 2020 - 10:48:47 CEST