[wiki] [sites] added patched border option diff || 0x1bi
commit 9aa6602580889d5baa8291e2ab8339ec59871f85
Author: 0x1bi <ben_AT_0x1bi.net>
Date: Thu Nov 12 10:26:15 2020 -0500
added patched border option diff
diff --git a/tools.suckless.org/dmenu/patches/border/dmenu-border-20201112-1a13d04.diff b/tools.suckless.org/dmenu/patches/border/dmenu-border-20201112-1a13d04.diff
new file mode 100644
index 00000000..bea0cee6
--- /dev/null
+++ b/tools.suckless.org/dmenu/patches/border/dmenu-border-20201112-1a13d04.diff
_AT_@ -0,0 +1,50 @@
+From d0c3fc8a634c153856cd41438f705175a21ec69a Mon Sep 17 00:00:00 2001
+From: braskin <benjaminiraskin_AT_gmail.com>
+Date: Thu, 12 Nov 2020 10:13:29 -0500
+Subject: [PATCH] fixed border width draw for topbar
+
+---
+ config.def.h | 3 +++
+ dmenu.c | 6 +++++-
+ 2 files changed, 8 insertions(+), 1 deletion(-)
+
+diff --git a/config.def.h b/config.def.h
+index 1edb647..dd3eb31 100644
+--- a/config.def.h
++++ b/config.def.h
+_AT_@ -21,3 +21,6 @@ static unsigned int lines = 0;
+ * for example: " /?\"&[]"
+ */
+ static const char worddelimiters[] = " ";
++
++/* Size of the window border */
++static unsigned int border_width = 0;
+diff --git a/dmenu.c b/dmenu.c
+index 65f25ce..716e655 100644
+--- a/dmenu.c
++++ b/dmenu.c
+_AT_@ -659,9 +659,11 @@ setup(void)
+ swa.override_redirect = True;
+ swa.background_pixel = scheme[SchemeNorm][ColBg].pixel;
+ swa.event_mask = ExposureMask | KeyPressMask | VisibilityChangeMask;
+- win = XCreateWindow(dpy, parentwin, x, y, mw, mh, 0,
++ win = XCreateWindow(dpy, parentwin, x, y - (topbar ? 0 : border_width * 2), mw - border_width * 2, mh, border_width,
+ CopyFromParent, CopyFromParent, CopyFromParent,
+ CWOverrideRedirect | CWBackPixel | CWEventMask, &swa);
++ if (border_width)
++ XSetWindowBorder(dpy, win, scheme[SchemeSel][ColBg].pixel);
+ XSetClassHint(dpy, win, &ch);
+
+
+_AT_@ -733,6 +735,8 @@ main(int argc, char *argv[])
+ colors[SchemeSel][ColFg] = argv[++i];
+ else if (!strcmp(argv[i], "-w")) /* embedding window id */
+ embed = argv[++i];
++ else if (!strcmp(argv[i], "-bw"))
++ border_width = atoi(argv[++i]); /* border width */
+ else
+ usage();
+
+--
+2.25.1
+
diff --git a/tools.suckless.org/dmenu/patches/border/index.md b/tools.suckless.org/dmenu/patches/border/index.md
index efd408e3..a4c8b6d9 100644
--- a/tools.suckless.org/dmenu/patches/border/index.md
+++ b/tools.suckless.org/dmenu/patches/border/index.md
_AT_@ -32,6 +32,7 @@ Create menu with border width 3:
Download
--------
+* [dmenu-border-20201112-1a13d04.diff](dmenu-border-20201112-1a13d04.diff) (2020-11-12)
* [dmenu-borderoption-20200217-bf60a1e.diff](dmenu-borderoption-20200217-bf60a1e.diff) (2020-02-17)
Authors
Received on Thu Nov 12 2020 - 16:26:19 CET
This archive was generated by hypermail 2.3.0
: Thu Nov 12 2020 - 16:36:43 CET