summaryrefslogtreecommitdiffstats
path: root/main.c
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--main.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/main.c b/main.c
index 73b713f..3470287 100644
--- a/main.c
+++ b/main.c
@@ -18,10 +18,9 @@
18/* extern */ 18/* extern */
19 19
20char stext[256]; 20char stext[256];
21int screen, sx, sy, sw, sh, wax, way, waw, wah; 21int screen, sw, sh, wax, way, waw, wah;
22unsigned int bh, ntags, numlockmask; 22unsigned int bh, ntags, numlockmask;
23Atom wmatom[WMLast], netatom[NetLast]; 23Atom wmatom[WMLast], netatom[NetLast];
24Bool running = True;
25Bool *seltag; 24Bool *seltag;
26Bool selscreen = True; 25Bool selscreen = True;
27Client *clients = NULL; 26Client *clients = NULL;
@@ -36,6 +35,7 @@ Window root, barwin;
36 35
37static int (*xerrorxlib)(Display *, XErrorEvent *); 36static int (*xerrorxlib)(Display *, XErrorEvent *);
38static Bool otherwm, readin; 37static Bool otherwm, readin;
38static Bool running = True;
39 39
40static void 40static void
41cleanup(void) { 41cleanup(void) {
@@ -181,7 +181,6 @@ setup(void) {
181 dc.sel[ColFG] = initcolor(SELFGCOLOR); 181 dc.sel[ColFG] = initcolor(SELFGCOLOR);
182 initfont(FONT); 182 initfont(FONT);
183 /* geometry */ 183 /* geometry */
184 sx = sy = 0;
185 sw = DisplayWidth(dpy, screen); 184 sw = DisplayWidth(dpy, screen);
186 sh = DisplayHeight(dpy, screen); 185 sh = DisplayHeight(dpy, screen);
187 initlayouts(); 186 initlayouts();
@@ -190,15 +189,15 @@ setup(void) {
190 wa.override_redirect = 1; 189 wa.override_redirect = 1;
191 wa.background_pixmap = ParentRelative; 190 wa.background_pixmap = ParentRelative;
192 wa.event_mask = ButtonPressMask | ExposureMask; 191 wa.event_mask = ButtonPressMask | ExposureMask;
193 barwin = XCreateWindow(dpy, root, sx, sy + (TOPBAR ? 0 : sh - bh), sw, bh, 0, 192 barwin = XCreateWindow(dpy, root, 0, (TOPBAR ? 0 : sh - bh), sw, bh, 0,
194 DefaultDepth(dpy, screen), CopyFromParent, DefaultVisual(dpy, screen), 193 DefaultDepth(dpy, screen), CopyFromParent, DefaultVisual(dpy, screen),
195 CWOverrideRedirect | CWBackPixmap | CWEventMask, &wa); 194 CWOverrideRedirect | CWBackPixmap | CWEventMask, &wa);
196 XDefineCursor(dpy, barwin, cursor[CurNormal]); 195 XDefineCursor(dpy, barwin, cursor[CurNormal]);
197 XMapRaised(dpy, barwin); 196 XMapRaised(dpy, barwin);
198 strcpy(stext, "dwm-"VERSION); 197 strcpy(stext, "dwm-"VERSION);
199 /* windowarea */ 198 /* windowarea */
200 wax = sx; 199 wax = 0;
201 way = sy + (TOPBAR ? bh : 0); 200 way = (TOPBAR ? bh : 0);
202 wah = sh - bh; 201 wah = sh - bh;
203 waw = sw; 202 waw = sw;
204 /* pixmap for everything */ 203 /* pixmap for everything */