comparison main.c @ 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 f05da68014bd
children 1cb9ae0a0104
comparison
equal deleted inserted replaced
738:2ae946319c7b 739:7834ffd650d5
139 /* bar */ 139 /* bar */
140 dc.h = bh = dc.font.height + 2; 140 dc.h = bh = dc.font.height + 2;
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 */
156 dc.drawable = XCreatePixmap(dpy, root, sw, bh, DefaultDepth(dpy, screen)); 156 dc.drawable = XCreatePixmap(dpy, root, sw, bh, DefaultDepth(dpy, screen));
157 dc.gc = XCreateGC(dpy, root, 0, 0); 157 dc.gc = XCreateGC(dpy, root, 0, 0);