From f8a5d245468cc6e04903fe96e3efcbd85aea13d9 Mon Sep 17 00:00:00 2001 From: tsxv478 Date: Wed, 21 Sep 2022 02:21:53 +0300 Subject: border patch --- dmenu.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'dmenu.c') diff --git a/dmenu.c b/dmenu.c index 2a9d8cd..fe12f1f 100644 --- a/dmenu.c +++ b/dmenu.c @@ -703,9 +703,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); @@ -779,6 +781,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(); -- cgit v1.2.3