aboutsummaryrefslogtreecommitdiffstats
path: root/xevents.c
diff options
context:
space:
mode:
authorokan2019-03-11 15:25:46 +0000
committerokan2019-03-11 15:25:46 +0000
commit7f085a1788f40d1aef4ac5cd1880eb0c8f0ac66f (patch)
tree355d47e6aba3d350bc9556fb580b5ad64c8843a6 /xevents.c
parent63b04a6fe846e4bfab249a1f3e496ab04511b299 (diff)
downloadcwm-7f085a1788f40d1aef4ac5cd1880eb0c8f0ac66f.tar.gz
Check the atom type on propertynotify before iterating.
Diffstat (limited to '')
-rw-r--r--xevents.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/xevents.c b/xevents.c
index ce3f740..80590be 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.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);
+ }
}
}