diff options
author | zachir <zachir@librem.one> | 2023-02-21 13:47:13 -0600 |
---|---|---|
committer | zachir <zachir@librem.one> | 2023-02-21 13:47:13 -0600 |
commit | addad8d7671563820a8a10cb181e1034d1891678 (patch) | |
tree | ac2d62046eead2951c0abc9408064096618e7235 /dmenu.c | |
parent | 2e426cac046fdd057880eda259482db0e965aebd (diff) |
add borderoption patch
Diffstat (limited to 'dmenu.c')
-rw-r--r-- | dmenu.c | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -696,9 +696,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); @@ -770,6 +772,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 if (!strcmp(argv[i], "-d") || /* field separator */ !strcmp(argv[i], "-D")) { sepchr = argv[i][1] == 'D' ? strrchr : strchr; |