apply border patch

master
Ryan 2023-09-18 19:41:27 -04:00
parent efe9765517
commit 8e5365c96c
Signed by: ryan
GPG Key ID: 7D7E2E94267DAD95
2 changed files with 8 additions and 1 deletions

View File

@ -39,6 +39,9 @@ static unsigned int columns = 0;
*/
static const char worddelimiters[] = " ";
/* Size of the window border */
static unsigned int border_width = 0;
/*
* Xresources preferences to load at startup
*/

View File

@ -953,9 +953,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, root, 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);
@ -1047,6 +1049,8 @@ main(int argc, char *argv[])
colors[SchemeSelHighlight][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();