summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorbakkeby <[email protected]>2020-05-03 10:09:26 +0200
committerbakkeby <[email protected]>2020-05-03 10:09:26 +0200
commit657988fbbf2825e303dd0fe107a142a89933a897 (patch)
tree28db8b181756cd76c193fa3af140e3a0234a8a83
parentf028377c98bd55cd4611add14a4fa7100329451d (diff)
downloaddwm-flexipatch-657988fbbf2825e303dd0fe107a142a89933a897.tar.gz
dwm-flexipatch-657988fbbf2825e303dd0fe107a142a89933a897.zip
Added the no transparent borders patch
-rw-r--r--README.md7
-rw-r--r--drw.c6
-rw-r--r--patches.def.h7
3 files changed, 20 insertions, 0 deletions
diff --git a/README.md b/README.md
index 573ff08..aa7a363 100644
--- a/README.md
+++ b/README.md
@@ -15,6 +15,8 @@ Refer to [https://dwm.suckless.org/](https://dwm.suckless.org/) for details on t
### Changelog:
+2020-05-03 - Added the no transparent borders patch which removes opacity from window borders when the alpha patch is not used
+
2020-05-02 - Added dwmblocks patch
2020-04-27 - Upgraded the tagmonfixfs patch to better support moving fullscreen windows to adjacent monitors
@@ -279,6 +281,11 @@ Refer to [https://dwm.suckless.org/](https://dwm.suckless.org/) for details on t
- enable modifying dmenu in config.def.h which resulted previously in a compilation error because two lines of code hardcode dmenu into dwm
- allows complete removal of dmenu, should you want to do that
+ - [no_transparent_borders](https://github.com/szatanjl/dwm/commit/1529909466206016f2101457bbf37c67195714c8)
+ - when terminals have transparency then their borders also become transparent
+ - this patch ensures that borders have no transparency
+ - note that this patch is only relevant if you are not using the alpha patch
+
- [onlyquitonempty](https://dwm.suckless.org/patches/onlyquitonempty/)
- makes it so dwm will only exit via quit() if no windows are open (in order to prevent accidental loss of work)
diff --git a/drw.c b/drw.c
index c8c4d5e..b746bc0 100644
--- a/drw.c
+++ b/drw.c
@@ -237,7 +237,13 @@ drw_clr_create(
DefaultColormap(drw->dpy, drw->screen),
clrname, dest))
die("error, cannot allocate color '%s'", clrname);
+
+ #if NO_TRANSPARENT_BORDERS_PATCH
+ dest->pixel |= 0xff << 24;
+ #endif // NO_TRANSPARENT_BORDERS_PATCH
#endif // ALPHA_PATCH
+
+
}
/* Wrapper to create color schemes. The caller has to call free(3) on the
diff --git a/patches.def.h b/patches.def.h
index 3549885..069d81b 100644
--- a/patches.def.h
+++ b/patches.def.h
@@ -343,6 +343,13 @@
*/
#define NODMENU_PATCH 0
+/* When terminals have transparency then their borders also become transparent.
+ * This patch ensures that borders have no transparency. Note that this patch is
+ * only relevant if you are not using the alpha patch.
+ * https://github.com/szatanjl/dwm/commit/1529909466206016f2101457bbf37c67195714c8
+ */
+#define NO_TRANSPARENT_BORDERS_PATCH 0
+
/* This patch makes it so dwm will only exit via quit() if no windows are open.
* This is to prevent you accidentally losing all your work.
* https://dwm.suckless.org/patches/onlyquitonempty/