make this XQueryTree like the other

This commit is contained in:
okan 2014-02-03 20:29:05 +00:00
parent ad96c16838
commit 8a6dd51fac

View File

@ -97,19 +97,17 @@ screen_updatestackingorder(struct screen_ctx *sc)
struct client_ctx *cc; struct client_ctx *cc;
unsigned int nwins, i, s; unsigned int nwins, i, s;
if (!XQueryTree(X_Dpy, sc->rootwin, &w0, &w1, &wins, &nwins)) if (XQueryTree(X_Dpy, sc->rootwin, &w0, &w1, &wins, &nwins)) {
return; for (s = 0, i = 0; i < nwins; i++) {
/* Skip hidden windows */
for (s = 0, i = 0; i < nwins; i++) { if ((cc = client_find(wins[i])) == NULL ||
/* Skip hidden windows */ cc->flags & CLIENT_HIDDEN)
if ((cc = client_find(wins[i])) == NULL || continue;
cc->flags & CLIENT_HIDDEN)
continue; cc->stackingorder = s++;
}
cc->stackingorder = s++; XFree(wins);
} }
XFree(wins);
} }
/* /*