diff options
author | okan | 2014-02-03 20:29:05 +0000 |
---|---|---|
committer | okan | 2014-02-03 20:29:05 +0000 |
commit | 2d0a84ba83633a3ef2de56baa1c9289869dafde1 (patch) | |
tree | 9e26f1f19fe0910e2ae60078c96eab7748dd5b0d | |
parent | 0591be5c2b59055e9d6b193f634e9bc16bd1e999 (diff) | |
download | cwm-2d0a84ba83633a3ef2de56baa1c9289869dafde1.tar.gz |
make this XQueryTree like the other
-rw-r--r-- | screen.c | 24 |
1 files changed, 11 insertions, 13 deletions
@@ -15,7 +15,7 @@ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * - * $OpenBSD: screen.c,v 1.58 2014/02/03 20:20:39 okan Exp $ + * $OpenBSD: screen.c,v 1.59 2014/02/03 20:29:05 okan Exp $ */ #include <sys/param.h> @@ -97,19 +97,17 @@ screen_updatestackingorder(struct screen_ctx *sc) struct client_ctx *cc; unsigned int nwins, i, s; - if (!XQueryTree(X_Dpy, sc->rootwin, &w0, &w1, &wins, &nwins)) - return; - - for (s = 0, i = 0; i < nwins; i++) { - /* Skip hidden windows */ - if ((cc = client_find(wins[i])) == NULL || - cc->flags & CLIENT_HIDDEN) - continue; - - cc->stackingorder = s++; + if (XQueryTree(X_Dpy, sc->rootwin, &w0, &w1, &wins, &nwins)) { + for (s = 0, i = 0; i < nwins; i++) { + /* Skip hidden windows */ + if ((cc = client_find(wins[i])) == NULL || + cc->flags & CLIENT_HIDDEN) + continue; + + cc->stackingorder = s++; + } + XFree(wins); } - - XFree(wins); } /* |