summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAnselm R. Garbe <arg@suckless.org>2007-02-08 11:48:01 +0100
committerAnselm R. Garbe <arg@suckless.org>2007-02-08 11:48:01 +0100
commitd2dd58eabde15ebf0a2c4c61239d65543931ae04 (patch)
treec9f876ba14362b01cd343183ae64e9c7384b0dcf
parentnext version is 3.5 (diff)
downloaddwm-d2dd58eabde15ebf0a2c4c61239d65543931ae04.tar.gz
dwm-d2dd58eabde15ebf0a2c4c61239d65543931ae04.zip
added TOPBAR option for making the bar appear what the user likes
-rw-r--r--config.arg.h1
-rw-r--r--config.default.h1
-rw-r--r--main.c6
3 files changed, 5 insertions, 3 deletions
diff --git a/config.arg.h b/config.arg.h
index 7b8d048..db18df2 100644
--- a/config.arg.h
+++ b/config.arg.h
@@ -22,6 +22,7 @@ const char *tags[] = { "1", "2", "3", "4", "5", "6", "7", "8", "9", NULL };
22#define MODKEY Mod1Mask 22#define MODKEY Mod1Mask
23#define NMASTER 1 /* clients in master area */ 23#define NMASTER 1 /* clients in master area */
24#define SNAP 40 /* pixel */ 24#define SNAP 40 /* pixel */
25#define TOPBAR True /* False */
25 26
26#define KEYS \ 27#define KEYS \
27static Key key[] = { \ 28static Key key[] = { \
diff --git a/config.default.h b/config.default.h
index 9f1f07d..26776ea 100644
--- a/config.default.h
+++ b/config.default.h
@@ -22,6 +22,7 @@ const char *tags[] = { "1", "2", "3", "4", "5", "6", "7", "8", "9", NULL };
22#define MODKEY Mod1Mask 22#define MODKEY Mod1Mask
23#define NMASTER 1 /* clients in master area */ 23#define NMASTER 1 /* clients in master area */
24#define SNAP 20 /* pixel */ 24#define SNAP 20 /* pixel */
25#define TOPBAR True /* False */
25 26
26#define KEYS \ 27#define KEYS \
27static Key key[] = { \ 28static Key key[] = { \
diff --git a/main.c b/main.c
index 4f1c6aa..68f60c7 100644
--- a/main.c
+++ b/main.c
@@ -141,15 +141,15 @@ setup(void) {
141 wa.override_redirect = 1; 141 wa.override_redirect = 1;
142 wa.background_pixmap = ParentRelative; 142 wa.background_pixmap = ParentRelative;
143 wa.event_mask = ButtonPressMask | ExposureMask; 143 wa.event_mask = ButtonPressMask | ExposureMask;
144 barwin = XCreateWindow(dpy, root, sx, sy + sh - bh, sw, bh, 0, DefaultDepth(dpy, screen), 144 barwin = XCreateWindow(dpy, root, sx, sy + (TOPBAR ? 0 : sh - bh), sw, bh, 0,
145 CopyFromParent, DefaultVisual(dpy, screen), 145 DefaultDepth(dpy, screen), CopyFromParent, DefaultVisual(dpy, screen),
146 CWOverrideRedirect | CWBackPixmap | CWEventMask, &wa); 146 CWOverrideRedirect | CWBackPixmap | CWEventMask, &wa);
147 XDefineCursor(dpy, barwin, cursor[CurNormal]); 147 XDefineCursor(dpy, barwin, cursor[CurNormal]);
148 XMapRaised(dpy, barwin); 148 XMapRaised(dpy, barwin);
149 strcpy(stext, "dwm-"VERSION); 149 strcpy(stext, "dwm-"VERSION);
150 /* windowarea */ 150 /* windowarea */
151 wax = sx; 151 wax = sx;
152 way = sy; 152 way = sy + (TOPBAR ? bh : 0);
153 wah = sh - bh; 153 wah = sh - bh;
154 waw = sw; 154 waw = sw;
155 /* pixmap for everything */ 155 /* pixmap for everything */