diff options
author | tsxv478 <atvx717@infraredcombat.xyz> | 2022-09-21 02:21:53 +0300 |
---|---|---|
committer | tsxv478 <atvx717@infraredcombat.xyz> | 2022-09-21 02:21:53 +0300 |
commit | b585ebec88e7ba93833af2c0c086bd90ff823c92 (patch) | |
tree | 505a30a1a10f101c5afe22fed732af60693433e6 | |
parent | 5e8f66d62e53aeb6ae239fe12f230b4df3efad73 (diff) |
border patch
-rw-r--r-- | config.def.h | 3 | ||||
-rw-r--r-- | dmenu.c | 6 |
2 files changed, 8 insertions, 1 deletions
diff --git a/config.def.h b/config.def.h index 88ef264..cfff3e4 100644 --- a/config.def.h +++ b/config.def.h @@ -23,3 +23,6 @@ static unsigned int lines = 0; * for example: " /?\"&[]" */ static const char worddelimiters[] = " "; + +/* Size of the window border */ +static unsigned int border_width = 0; @@ -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(); |