aewl

changeset 739:7834ffd650d5

added TOPBAR option for making the bar appear what the user likes
author Anselm R. Garbe <arg@suckless.org>
date Thu, 08 Feb 2007 11:48:01 +0100
parents 2ae946319c7b
children 1cb9ae0a0104
files config.arg.h config.default.h main.c
diffstat 3 files changed, 5 insertions(+), 3 deletions(-) [+]
line diff
     1.1 --- a/config.arg.h	Thu Feb 08 11:11:15 2007 +0100
     1.2 +++ b/config.arg.h	Thu Feb 08 11:48:01 2007 +0100
     1.3 @@ -22,6 +22,7 @@
     1.4  #define MODKEY			Mod1Mask
     1.5  #define NMASTER			1		/* clients in master area */
     1.6  #define SNAP			40		/* pixel */
     1.7 +#define TOPBAR			True		/* False */
     1.8  
     1.9  #define KEYS \
    1.10  static Key key[] = { \
     2.1 --- a/config.default.h	Thu Feb 08 11:11:15 2007 +0100
     2.2 +++ b/config.default.h	Thu Feb 08 11:48:01 2007 +0100
     2.3 @@ -22,6 +22,7 @@
     2.4  #define MODKEY			Mod1Mask
     2.5  #define NMASTER			1		/* clients in master area */
     2.6  #define SNAP			20		/* pixel */
     2.7 +#define TOPBAR			True		/* False */
     2.8  
     2.9  #define KEYS \
    2.10  static Key key[] = { \
     3.1 --- a/main.c	Thu Feb 08 11:11:15 2007 +0100
     3.2 +++ b/main.c	Thu Feb 08 11:48:01 2007 +0100
     3.3 @@ -141,15 +141,15 @@
     3.4  	wa.override_redirect = 1;
     3.5  	wa.background_pixmap = ParentRelative;
     3.6  	wa.event_mask = ButtonPressMask | ExposureMask;
     3.7 -	barwin = XCreateWindow(dpy, root, sx, sy + sh - bh, sw, bh, 0, DefaultDepth(dpy, screen),
     3.8 -			CopyFromParent, DefaultVisual(dpy, screen),
     3.9 +	barwin = XCreateWindow(dpy, root, sx, sy + (TOPBAR ? 0 : sh - bh), sw, bh, 0,
    3.10 +			DefaultDepth(dpy, screen), CopyFromParent, DefaultVisual(dpy, screen),
    3.11  			CWOverrideRedirect | CWBackPixmap | CWEventMask, &wa);
    3.12  	XDefineCursor(dpy, barwin, cursor[CurNormal]);
    3.13  	XMapRaised(dpy, barwin);
    3.14  	strcpy(stext, "dwm-"VERSION);
    3.15  	/* windowarea */
    3.16  	wax = sx;
    3.17 -	way = sy;
    3.18 +	way = sy + (TOPBAR ? bh : 0);
    3.19  	wah = sh - bh;
    3.20  	waw = sw;
    3.21  	/* pixmap for everything */