summary refs log tree commit diff
path: root/screen.c
diff options
context:
space:
mode:
authorokan <okan>2014-02-03 20:29:05 +0000
committerokan <okan>2014-02-03 20:29:05 +0000
commit8a6dd51fac7632b413dd36c08d725ab28b161797 (patch)
tree8b2d34846003d4d66d203986b49b1582d9c15c12 /screen.c
parentad96c168386aced17e3fa4859dad1e1e2d80bb57 (diff)
downloadcwm-8a6dd51fac7632b413dd36c08d725ab28b161797.tar.gz
cwm-8a6dd51fac7632b413dd36c08d725ab28b161797.tar.xz
cwm-8a6dd51fac7632b413dd36c08d725ab28b161797.zip
make this XQueryTree like the other
Diffstat (limited to 'screen.c')
-rw-r--r--screen.c22
1 files changed, 10 insertions, 12 deletions
diff --git a/screen.c b/screen.c
index a9c051d..0bcdeec 100644
--- a/screen.c
+++ b/screen.c
@@ -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);
 }
 
 /*