added TOPBAR option for making the bar appear what the user likes d2dd58ea
Anselm R. Garbe · 2007-02-08 11:48 3 file(s) · +5 −3
config.arg.h +1 −0
22 22
#define MODKEY			Mod1Mask
23 23
#define NMASTER			1		/* clients in master area */
24 24
#define SNAP			40		/* pixel */
25 +
#define TOPBAR			True		/* False */
25 26
26 27
#define KEYS \
27 28
static Key key[] = { \
config.default.h +1 −0
22 22
#define MODKEY			Mod1Mask
23 23
#define NMASTER			1		/* clients in master area */
24 24
#define SNAP			20		/* pixel */
25 +
#define TOPBAR			True		/* False */
25 26
26 27
#define KEYS \
27 28
static Key key[] = { \
main.c +3 −3
141 141
	wa.override_redirect = 1;
142 142
	wa.background_pixmap = ParentRelative;
143 143
	wa.event_mask = ButtonPressMask | ExposureMask;
144 -
	barwin = XCreateWindow(dpy, root, sx, sy + sh - bh, sw, bh, 0, DefaultDepth(dpy, screen),
145 -
			CopyFromParent, DefaultVisual(dpy, screen),
144 +
	barwin = XCreateWindow(dpy, root, sx, sy + (TOPBAR ? 0 : sh - bh), sw, bh, 0,
145 +
			DefaultDepth(dpy, screen), CopyFromParent, DefaultVisual(dpy, screen),
146 146
			CWOverrideRedirect | CWBackPixmap | CWEventMask, &wa);
147 147
	XDefineCursor(dpy, barwin, cursor[CurNormal]);
148 148
	XMapRaised(dpy, barwin);
149 149
	strcpy(stext, "dwm-"VERSION);
150 150
	/* windowarea */
151 151
	wax = sx;
152 -
	way = sy;
152 +
	way = sy + (TOPBAR ? bh : 0);
153 153
	wah = sh - bh;
154 154
	waw = sw;
155 155
	/* pixmap for everything */