diff options
author | Okan Demirmen <okan@cvs.openbsd.org> | 2014-02-03 20:29:06 +0000 |
---|---|---|
committer | Okan Demirmen <okan@cvs.openbsd.org> | 2014-02-03 20:29:06 +0000 |
commit | 6aa0f8f4f153b66845de260d5aba48fe41907538 (patch) | |
tree | 8dd8e6e07b9fe1fabf29fcb8c64cc9d13dd1f32d | |
parent | b34746751b00f301423ba6b1454ae9b303ba8b8d (diff) |
make this XQueryTree like the other
-rw-r--r-- | app/cwm/screen.c | 24 |
1 files changed, 11 insertions, 13 deletions
diff --git a/app/cwm/screen.c b/app/cwm/screen.c index 735ff8420..9d6503ae3 100644 --- a/app/cwm/screen.c +++ b/app/cwm/screen.c @@ -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); } /* |