aewl

changeset 602:3c765cc4bce4

less obtrusive indicator (only a top line)
author arg@mig29
date Fri, 01 Dec 2006 15:03:42 +0100
parents bfea29f1e4a4
children 213d67302d28
files draw.c dwm.1
diffstat 2 files changed, 5 insertions(+), 18 deletions(-) [+]
line diff
     1.1 --- a/draw.c	Fri Dec 01 12:52:16 2006 +0100
     1.2 +++ b/draw.c	Fri Dec 01 15:03:42 2006 +0100
     1.3 @@ -30,13 +30,12 @@
     1.4  }
     1.5  
     1.6  static void
     1.7 -drawtext(const char *text, unsigned long col[ColLast], Bool dot, Bool border) {
     1.8 +drawtext(const char *text, unsigned long col[ColLast], Bool dot, Bool line) {
     1.9  	int x, y, w, h;
    1.10  	static char buf[256];
    1.11  	unsigned int len, olen;
    1.12  	XGCValues gcv;
    1.13  	XRectangle r = { dc.x, dc.y, dc.w, dc.h };
    1.14 -	XPoint pt[5];
    1.15  
    1.16  	XSetForeground(dpy, dc.gc, col[ColBG]);
    1.17  	XFillRectangles(dpy, dc.drawable, dc.gc, &r, 1);
    1.18 @@ -75,25 +74,13 @@
    1.19  		XDrawString(dpy, dc.drawable, dc.gc, x, y, buf, len);
    1.20  	}
    1.21  	if(dot) {
    1.22 -		r.x = dc.x + 2;
    1.23 +		r.x = dc.x + 1;
    1.24  		r.y = dc.y + 2;
    1.25  		r.width = r.height = (h + 2) / 4;
    1.26  		XFillRectangles(dpy, dc.drawable, dc.gc, &r, 1);
    1.27  	}
    1.28 -	if(border) {
    1.29 -		pt[0].x = dc.x + 1;
    1.30 -		pt[0].y = dc.y + 1;
    1.31 -		pt[1].x = dc.w - 2;
    1.32 -		pt[1].y = 0;
    1.33 -		pt[2].x = 0;
    1.34 -		pt[2].y = dc.h - 2;
    1.35 -		pt[3].x = -(dc.w - 2);
    1.36 -		pt[3].y = 0;
    1.37 -		pt[4].x = 0;
    1.38 -		pt[4].y = -(dc.h - 2);
    1.39 -		XDrawLines(dpy, dc.drawable, dc.gc, pt, 5, CoordModePrevious);
    1.40 -	}
    1.41 -}
    1.42 +	if(line)
    1.43 +		XDrawLine(dpy, dc.drawable, dc.gc, dc.x + 1, dc.y + 1, dc.x + dc.w - 1, dc.y + 1); }
    1.44  
    1.45  /* extern */
    1.46  
     2.1 --- a/dwm.1	Fri Dec 01 12:52:16 2006 +0100
     2.2 +++ b/dwm.1	Fri Dec 01 15:03:42 2006 +0100
     2.3 @@ -22,7 +22,7 @@
     2.4  the title of the focused window, and the text read from standard input. The
     2.5  selected tags are indicated with a different color. The tags of the focused
     2.6  window are indicated with a small point in the top left corner.  The tags which
     2.7 -are applied to one or more clients are indicated with a border.
     2.8 +are applied to one or more clients are indicated with a top line.
     2.9  .P
    2.10  dwm draws a 1-pixel border around windows to indicate the focus state.
    2.11  Unfocused windows contain a small bar in front of them displaying their title.