summaryrefslogtreecommitdiff
path: root/app/cwm
diff options
context:
space:
mode:
authorOkan Demirmen <okan@cvs.openbsd.org>2019-03-06 13:32:20 +0000
committerOkan Demirmen <okan@cvs.openbsd.org>2019-03-06 13:32:20 +0000
commit61333c748a3f05356d693578b824b6236d7c50d7 (patch)
tree230db3e17b0bd2b120e1a79762ce7c1517f583de /app/cwm
parent8654f5532f4f30eaff2f96ff12230a01f4e0c9e4 (diff)
same thing as screen_find()
Diffstat (limited to 'app/cwm')
-rw-r--r--app/cwm/xevents.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/app/cwm/xevents.c b/app/cwm/xevents.c
index 19f957857..fa2d4c1ed 100644
--- a/app/cwm/xevents.c
+++ b/app/cwm/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);
}
}