diff options
Diffstat (limited to 'x11-misc/dmenu/files/03_border.diff')
-rw-r--r-- | x11-misc/dmenu/files/03_border.diff | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/x11-misc/dmenu/files/03_border.diff b/x11-misc/dmenu/files/03_border.diff new file mode 100644 index 0000000..fb988f1 --- /dev/null +++ b/x11-misc/dmenu/files/03_border.diff @@ -0,0 +1,37 @@ +diff --git a/config.def.h b/config.def.h +index 6b0a32704d..a7bf4863b3 100644 +--- a/config.def.h ++++ b/config.def.h +@@ -25,3 +25,6 @@ + * for example: " /?\"&[]" + */ + static const char worddelimiters[] = " "; ++ ++/* Size of the window border */ ++static unsigned int border_width = 0; +diff --git a/dmenu.c b/dmenu.c +index bafda5af1f..9f9dfb6e27 100644 +--- a/dmenu.c ++++ b/dmenu.c +@@ -715,9 +715,11 @@ + 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); + + /* input methods */ +@@ -792,6 +794,8 @@ + 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(); + |