From 16608db91ff274b13d248ff43b3ca5cdba648f28 Mon Sep 17 00:00:00 2001 From: mhsn Date: Sat, 20 Sep 2025 19:42:03 +0100 Subject: add many dmenu patches --- x11-misc/dmenu/files/03_border.diff | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 x11-misc/dmenu/files/03_border.diff (limited to 'x11-misc/dmenu/files/03_border.diff') 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(); + -- cgit v1.2.3