diff options
author | rafa_99 <rafa99@protonmail.com> | 2020-09-02 17:55:19 +0100 |
---|---|---|
committer | rafa_99 <rafa99@protonmail.com> | 2020-09-02 17:55:19 +0100 |
commit | 8fb98fee53b13bc690c457dde0417b78b0532be4 (patch) | |
tree | e446190e18d8f906284640b48845296cd6e924f3 | |
parent | 4c0864efda50d98a2eee62af38aa38e21206b215 (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 bfc0083..d9e41da 100644 --- a/config.def.h +++ b/config.def.h @@ -18,3 +18,6 @@ static unsigned int lines = 0; * for example: " /?\"&[]" */ static const char worddelimiters[] = " "; + +/* Size of the window border */ +static unsigned int border_width = 0; @@ -659,9 +659,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); @@ -733,6 +735,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(); |