borderoption.patch (975B)
1 diff --git a/dmenu.c b/dmenu.c 2 index 65f25ce..f0c3c6f 100644 3 --- a/dmenu.c 4 +++ b/dmenu.c 5 @@ -659,9 +659,11 @@ setup(void) 6 swa.override_redirect = True; 7 swa.background_pixel = scheme[SchemeNorm][ColBg].pixel; 8 swa.event_mask = ExposureMask | KeyPressMask | VisibilityChangeMask; 9 - win = XCreateWindow(dpy, parentwin, x, y, mw, mh, 0, 10 + win = XCreateWindow(dpy, parentwin, x, y, mw, mh, border_width, 11 CopyFromParent, CopyFromParent, CopyFromParent, 12 CWOverrideRedirect | CWBackPixel | CWEventMask, &swa); 13 + if (border_width) 14 + XSetWindowBorder(dpy, win, scheme[SchemeSel][ColBg].pixel); 15 XSetClassHint(dpy, win, &ch); 16 17 18 @@ -733,6 +735,8 @@ main(int argc, char *argv[]) 19 colors[SchemeSel][ColFg] = argv[++i]; 20 else if (!strcmp(argv[i], "-w")) /* embedding window id */ 21 embed = argv[++i]; 22 + else if (!strcmp(argv[i], "-bw")) 23 + border_width = atoi(argv[++i]); /* border width */ 24 else 25 usage(); 26 27 -- 28 2.24.1 29