sites

public wiki contents of suckless.org
git clone git://git.suckless.org/sites
Log | Files | Refs

dmenu-border-4.9.diff (1153B)


      1 diff -up dmenu-4.9-b/config.def.h dmenu-4.9-a/config.def.h
      2 --- dmenu-4.9-b/config.def.h	2019-02-02 13:55:02.000000000 +0100
      3 +++ dmenu-4.9-a/config.def.h	2019-05-19 02:10:12.740040403 +0200
      4 @@ -21,3 +21,6 @@ static unsigned int lines      = 0;
      5   * for example: " /?\"&[]"
      6   */
      7  static const char worddelimiters[] = " ";
      8 +
      9 +/* Size of the window border */
     10 +static const unsigned int border_width = 5;
     11 diff -up dmenu-4.9-b/dmenu.c dmenu-4.9-a/dmenu.c
     12 --- dmenu-4.9-b/dmenu.c	2019-02-02 13:55:02.000000000 +0100
     13 +++ dmenu-4.9-a/dmenu.c	2019-05-19 02:11:20.966710117 +0200
     14 @@ -654,9 +654,10 @@ setup(void)
     15  	swa.override_redirect = True;
     16  	swa.background_pixel = scheme[SchemeNorm][ColBg].pixel;
     17  	swa.event_mask = ExposureMask | KeyPressMask | VisibilityChangeMask;
     18 -	win = XCreateWindow(dpy, parentwin, x, y, mw, mh, 0,
     19 +	win = XCreateWindow(dpy, parentwin, x, y, mw, mh, border_width,
     20  	                    CopyFromParent, CopyFromParent, CopyFromParent,
     21  	                    CWOverrideRedirect | CWBackPixel | CWEventMask, &swa);
     22 +	XSetWindowBorder(dpy, win, scheme[SchemeSel][ColBg].pixel);
     23  	XSetClassHint(dpy, win, &ch);
     24  
     25  	/* open input methods */