From e4052e93e1f1ad32133f9fd655c822c0fde0d88c Mon Sep 17 00:00:00 2001 From: Lukasz M Date: Sat, 2 May 2020 14:46:54 +0200 Subject: [PATCH] applied border patch --- config.def.h | 3 +++ dmenu.c | 3 ++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/config.def.h b/config.def.h index 1edb647..daa3773 100644 --- a/config.def.h +++ b/config.def.h @@ -21,3 +21,6 @@ static unsigned int lines = 0; * for example: " /?\"&[]" */ static const char worddelimiters[] = " "; + +/* Size of the window border */ +static const unsigned int border_width = 5; diff --git a/dmenu.c b/dmenu.c index 65f25ce..e8416fa 100644 --- a/dmenu.c +++ b/dmenu.c @@ -659,9 +659,10 @@ 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); + XSetWindowBorder(dpy, win, scheme[SchemeSel][ColBg].pixel); XSetClassHint(dpy, win, &ch);