summary refs log tree commit diff
path: root/screen.c
diff options
context:
space:
mode:
authorokan <okan>2018-01-23 16:18:59 +0000
committerokan <okan>2018-01-23 16:18:59 +0000
commitf34e659ca7a8f169ba26f4ace13c3b2885888847 (patch)
tree0f05c4e9b82830ef48e02cba391d95b18904b111 /screen.c
parent03a2e9cf052f9dcc3e357c38f0c527cdfe40eac1 (diff)
downloadcwm-f34e659ca7a8f169ba26f4ace13c3b2885888847.tar.gz
cwm-f34e659ca7a8f169ba26f4ace13c3b2885888847.tar.xz
cwm-f34e659ca7a8f169ba26f4ace13c3b2885888847.zip
Fix wins comparison declaration since it's unsigned from XQueryTree().
Diffstat (limited to 'screen.c')
-rw-r--r--screen.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/screen.c b/screen.c
index 5887784..5025899 100644
--- a/screen.c
+++ b/screen.c
@@ -37,7 +37,8 @@ screen_init(int which)
 	struct screen_ctx	*sc;
 	Window			*wins, w0, w1, active = None;
 	XSetWindowAttributes	 rootattr;
-	unsigned int		 nwins, i;
+	unsigned int		 nwins, w;
+	int			 i;
 
 	sc = xmalloc(sizeof(*sc));
 
@@ -77,8 +78,8 @@ screen_init(int which)
 
 	/* Deal with existing clients. */
 	if (XQueryTree(X_Dpy, sc->rootwin, &w0, &w1, &wins, &nwins)) {
-		for (i = 0; i < nwins; i++)
-			(void)client_init(wins[i], sc, (active == wins[i]));
+		for (w = 0; w < nwins; w++)
+			(void)client_init(wins[w], sc, (active == wins[w]));
 
 		XFree(wins);
 	}