aboutsummaryrefslogtreecommitdiff
path: root/dmenu.c
diff options
context:
space:
mode:
authorPhilip Wittamore <philip@wittamore.com>2025-05-31 22:33:59 +0200
committerPhilip Wittamore <philip@wittamore.com>2025-05-31 22:33:59 +0200
commit5215efefccc6fe77177781b1fc235259bb937744 (patch)
tree47a2e36088f801c5fd5834342a443092020fe9e7 /dmenu.c
parent67c3bf64d2071695cdb74715e53ca45ea495beb5 (diff)
downloaddmenu-5215efefccc6fe77177781b1fc235259bb937744.tar.gz
dmenu-5215efefccc6fe77177781b1fc235259bb937744.tar.bz2
dmenu-5215efefccc6fe77177781b1fc235259bb937744.zip
update
Diffstat (limited to 'dmenu.c')
-rw-r--r--dmenu.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/dmenu.c b/dmenu.c
index 79e1d76..97d0c90 100644
--- a/dmenu.c
+++ b/dmenu.c
@@ -718,9 +718,11 @@ setup(void)
swa.override_redirect = True;
swa.background_pixel = scheme[SchemeNorm][ColBg].pixel;
swa.event_mask = ExposureMask | KeyPressMask | VisibilityChangeMask;
- win = XCreateWindow(dpy, root, 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);
/* input methods */
@@ -828,6 +830,8 @@ main(int argc, char *argv[])
colortemp[3] = 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();