- mw = (sw * MASTERW) / 100;
-
- bx = by = 0;
- bw = sw;
- dc.h = bh = dc.font.height + 4;
- wa.override_redirect = 1;
- wa.background_pixmap = ParentRelative;
- wa.event_mask = ButtonPressMask | ExposureMask;
- barwin = XCreateWindow(dpy, root, bx, by, bw, bh, 0, DefaultDepth(dpy, screen),
- CopyFromParent, DefaultVisual(dpy, screen),
- CWOverrideRedirect | CWBackPixmap | CWEventMask, &wa);
- XDefineCursor(dpy, barwin, cursor[CurNormal]);
- XMapRaised(dpy, barwin);
-
- dc.drawable = XCreatePixmap(dpy, root, sw, bh, DefaultDepth(dpy, screen));
- dc.gc = XCreateGC(dpy, root, 0, 0);
- XSetLineAttributes(dpy, dc.gc, 1, LineSolid, CapButt, JoinMiter);
-
- issel = XQueryPointer(dpy, root, &w, &w, &i, &i, &i, &i, &mask);
- strcpy(stext, "dwm-"VERSION);
+ initstyle();
+ initlayouts();
+ initbar();
+ /* multihead support */
+ selscreen = XQueryPointer(dpy, root, &w, &w, &i, &i, &i, &i, &mask);