Add border patch
This commit is contained in:
5
README
5
README
@@ -4,8 +4,9 @@ dmenu is an efficient dynamic menu for X.
|
|||||||
|
|
||||||
Patches
|
Patches
|
||||||
-------
|
-------
|
||||||
+ Case insensitive
|
+ case insensitive
|
||||||
+ Center
|
+ center
|
||||||
|
+ border (manually)
|
||||||
|
|
||||||
Requirements
|
Requirements
|
||||||
------------
|
------------
|
||||||
|
|||||||
@@ -21,3 +21,5 @@ static unsigned int lines = 0;
|
|||||||
* for example: " /?\"&[]"
|
* for example: " /?\"&[]"
|
||||||
*/
|
*/
|
||||||
static const char worddelimiters[] = " ";
|
static const char worddelimiters[] = " ";
|
||||||
|
|
||||||
|
static const unsigned int border_width = 5;
|
||||||
|
|||||||
2
config.h
2
config.h
@@ -22,3 +22,5 @@ static unsigned int lines = 6;
|
|||||||
* for example: " /?\"&[]"
|
* for example: " /?\"&[]"
|
||||||
*/
|
*/
|
||||||
static const char worddelimiters[] = " ";
|
static const char worddelimiters[] = " ";
|
||||||
|
|
||||||
|
static const unsigned int border_width = 3;
|
||||||
|
|||||||
3
dmenu.c
3
dmenu.c
@@ -669,9 +669,10 @@ setup(void)
|
|||||||
swa.override_redirect = True;
|
swa.override_redirect = True;
|
||||||
swa.background_pixel = scheme[SchemeNorm][ColBg].pixel;
|
swa.background_pixel = scheme[SchemeNorm][ColBg].pixel;
|
||||||
swa.event_mask = ExposureMask | KeyPressMask | VisibilityChangeMask;
|
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,
|
CopyFromParent, CopyFromParent, CopyFromParent,
|
||||||
CWOverrideRedirect | CWBackPixel | CWEventMask, &swa);
|
CWOverrideRedirect | CWBackPixel | CWEventMask, &swa);
|
||||||
|
XSetWindowBorder(dpy, win, scheme[SchemeSel][ColBg].pixel);
|
||||||
XSetClassHint(dpy, win, &ch);
|
XSetClassHint(dpy, win, &ch);
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user