summaryrefslogtreecommitdiff
path: root/app/cwm/xevents.c
diff options
context:
space:
mode:
authorOkan Demirmen <okan@cvs.openbsd.org>2019-03-11 15:25:47 +0000
committerOkan Demirmen <okan@cvs.openbsd.org>2019-03-11 15:25:47 +0000
commitf3994e21cd684a56173b3c0e28c31dd1bfa02c89 (patch)
tree57a49c3ad87d8411edf3393bc2ebb62e5c5d237a /app/cwm/xevents.c
parent4a0b82a5b8be3000830b0a8d27eaf023d212916b (diff)
Check the atom type on propertynotify before iterating.
Diffstat (limited to 'app/cwm/xevents.c')
-rw-r--r--app/cwm/xevents.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/app/cwm/xevents.c b/app/cwm/xevents.c
index ce3f740e6..80590beff 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.145 2019/03/10 22:53:11 okan Exp $
+ * $OpenBSD: xevents.c,v 1.146 2019/03/11 15:25:46 okan Exp $
*/
/*
@@ -210,9 +210,11 @@ xev_handle_propertynotify(XEvent *ee)
/* do nothing */
break;
}
- } else if ((sc = screen_find(e->window)) != NULL) {
- if (e->atom == ewmh[_NET_DESKTOP_NAMES])
- xu_ewmh_net_desktop_names(sc);
+ } else {
+ if (e->atom == ewmh[_NET_DESKTOP_NAMES]) {
+ if ((sc = screen_find(e->window)) != NULL)
+ xu_ewmh_net_desktop_names(sc);
+ }
}
}