commit d7006e8615bd9e97efe6e6481f355297917c3127
Author: Nik-Nothing <[email protected]>
Date:   Fri Jan 20 11:19:01 2023 +0000

    fix dmenu border patch for 5.2

diff --git a/tools.suckless.org/dmenu/patches/border/dmenu-border-5.2.diff 
b/tools.suckless.org/dmenu/patches/border/dmenu-border-5.2.diff
new file mode 100644
index 00000000..ed43d126
--- /dev/null
+++ b/tools.suckless.org/dmenu/patches/border/dmenu-border-5.2.diff
@@ -0,0 +1,37 @@
+diff --git a/config.def.h b/config.def.h
+index 1edb647..dd3eb31 100644
+--- a/config.def.h
++++ b/config.def.h
+@@ -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 27b7a30..5bcdbf1 100644
+--- a/dmenu.c
++++ b/dmenu.c
+@@ -684,9 +684,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, mw, mh, border_width,
+                           CopyFromParent, CopyFromParent, CopyFromParent,
+                           CWOverrideRedirect | CWBackPixel | CWEventMask, 
&swa);
++      if (border_width)
++              XSetWindowBorder(dpy, win, scheme[SchemeSel][ColBg].pixel);
+       XSetClassHint(dpy, win, &ch);
+ 
+ 
+@@ -757,6 +759,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();
+ 
diff --git a/tools.suckless.org/dmenu/patches/border/index.md 
b/tools.suckless.org/dmenu/patches/border/index.md
index a4c8b6d9..7eee89d6 100644
--- a/tools.suckless.org/dmenu/patches/border/index.md
+++ b/tools.suckless.org/dmenu/patches/border/index.md
@@ -13,6 +13,7 @@ coloured windows.
 Download
 --------
 * [dmenu-border-4.9.diff](dmenu-border-4.9.diff) (2019-05-19)
+* [dmenu-border-5.2.diff](dmenu-border-5.2.diff) (2023-01-20)
 
 Authors
 -------


Reply via email to