/* extern */
char stext[1024];
-int tsel = DEFTAG;
+Bool *tsel;
int screen, sx, sy, sw, sh, bx, by, bw, bh, mw;
unsigned int ntags;
Atom wmatom[WMLast], netatom[NetLast];
initrregs();
for(ntags = 0; tags[ntags]; ntags++);
+ tsel = emallocz(sizeof(Bool) * ntags);
+ tsel[DEFTAG] = True;
/* style */
dc.bg = getcolor(BGCOLOR);
dc.drawable = XCreatePixmap(dpy, root, sw, bh, DefaultDepth(dpy, screen));
dc.gc = XCreateGC(dpy, root, 0, 0);
+
+ strcpy(stext, "dwm-"VERSION);
drawstatus();
issel = XQueryPointer(dpy, root, &w, &w, &i, &i, &i, &i, &mask);
wa.cursor = cursor[CurNormal];
XChangeWindowAttributes(dpy, root, CWEventMask | CWCursor, &wa);
- strcpy(stext, "dwm-"VERSION);
scan();
- /* main event loop, reads status text from stdin as well */
+ /* main event loop, also reads status text from stdin */
+ XSync(dpy, False);
while(running) {
FD_ZERO(&rd);
if(readin)