summary refs log tree commit diff
diff options
context:
space:
mode:
authorokan <okan>2019-03-06 13:32:19 +0000
committerokan <okan>2019-03-06 13:32:19 +0000
commit9efa6c8c85780c3d5604d0686c943627765dd1a5 (patch)
tree3780662803f0138a2eb7e4ebf6e530eed9e3e845
parent0bda8f76067b737f34c11ef094b349c0c12fe118 (diff)
downloadcwm-9efa6c8c85780c3d5604d0686c943627765dd1a5.tar.gz
cwm-9efa6c8c85780c3d5604d0686c943627765dd1a5.tar.xz
cwm-9efa6c8c85780c3d5604d0686c943627765dd1a5.zip
same thing as screen_find()
-rw-r--r--xevents.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/xevents.c b/xevents.c
index 2ef236d..6c73b62 100644
--- a/xevents.c
+++ b/xevents.c
@@ -206,13 +206,9 @@ xev_handle_propertynotify(XEvent *ee)
 			/* do nothing */
 			break;
 		}
-	} else {
-		TAILQ_FOREACH(sc, &Screenq, entry) {
-			if (sc->rootwin == e->window) {
-				if (e->atom == ewmh[_NET_DESKTOP_NAMES])
-					xu_ewmh_net_desktop_names(sc);
-			}
-		}
+	} else if ((sc = screen_find(e->window)) != NULL) {
+		if (e->atom == ewmh[_NET_DESKTOP_NAMES]) 
+			xu_ewmh_net_desktop_names(sc);
 	}
 }