X-Git-Url: https://jasonwoof.com/gitweb/?a=blobdiff_plain;f=dwm.c;h=279f831f8a3c9893523ccf1419af53e7d7928462;hb=b279cef670e4d0e744e50331fce7a1f4a4e73798;hp=34bcd99cd2127831a3445a0429d0154c12aa6ce4;hpb=7ecadcee39697807c7b29221af49c67bb19ac055;p=dwm.git diff --git a/dwm.c b/dwm.c index 34bcd99..279f831 100644 --- a/dwm.c +++ b/dwm.c @@ -224,7 +224,7 @@ static void (*handler[LASTEvent]) (XEvent *) = { [UnmapNotify] = unmapnotify }; static Atom wmatom[WMLast], netatom[NetLast]; -static Bool otherwm, readin; +static Bool otherwm; static Bool running = True; static unsigned int tagset[] = {1, 1}; /* after start, first tag is selected */ static Client *clients = NULL; @@ -904,7 +904,7 @@ manage(Window w, XWindowAttributes *wa) { if(c->w == sw && c->h == sh) { c->x = sx; c->y = sy; - c->bw = wa->border_width; + c->bw = 0; } else { if(c->x + c->w + 2 * c->bw > sx + sw) @@ -1219,7 +1219,6 @@ run(void) { /* main event loop, also reads status text from stdin */ XSync(dpy, False); xfd = ConnectionNumber(dpy); - readin = True; offset = 0; len = sizeof stext - 1; sbuf[len] = stext[len] = '\0'; /* 0-terminator is never touched */ @@ -1562,8 +1561,7 @@ updategeom(void) { XineramaScreenInfo *info = NULL; /* window area geometry */ - if(XineramaIsActive(dpy)) { - info = XineramaQueryScreens(dpy, &n); + if(XineramaIsActive(dpy) && (info = XineramaQueryScreens(dpy, &n))) { if(n > 1) { int di, x, y; unsigned int dui;