From 9efa6c8c85780c3d5604d0686c943627765dd1a5 Mon Sep 17 00:00:00 2001 From: okan Date: Wed, 6 Mar 2019 13:32:19 +0000 Subject: same thing as screen_find() --- xevents.c | 10 +++------- 1 file 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); } } -- cgit 1.4.1