aboutsummaryrefslogtreecommitdiffstats
path: root/xevents.c
diff options
context:
space:
mode:
authorokan2019-03-06 13:32:19 +0000
committerokan2019-03-06 13:32:19 +0000
commit8d725d1cf917b4ce0bea540b9d029ff067a01afd (patch)
tree8702b5bfa10ffc66bb7f1703bd3e95f5f2d090be /xevents.c
parentf9cc6bc28fcaadc3f0eea32de200c98ed65671e4 (diff)
downloadcwm-8d725d1cf917b4ce0bea540b9d029ff067a01afd.tar.gz
same thing as screen_find()
Diffstat (limited to '')
-rw-r--r--xevents.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/xevents.c b/xevents.c
index 19f9578..fa2d4c1 100644
--- a/xevents.c
+++ b/xevents.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: xevents.c,v 1.137 2019/02/28 23:26:12 okan Exp $
+ * $OpenBSD: xevents.c,v 1.138 2019/03/06 13:32:19 okan Exp $
*/
/*
@@ -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);
}
}