summary refs log tree commit diff
diff options
context:
space:
mode:
authorokan <okan>2019-03-11 15:25:46 +0000
committerokan <okan>2019-03-11 15:25:46 +0000
commit9a7528f5b99bd234f724aa229cbf75fb6a813282 (patch)
tree07eaa6352406727e898b7e748520cb6a92c9b7af
parente55c0d48fab32daba096b61d0b63b2fcbfa49ed7 (diff)
downloadcwm-9a7528f5b99bd234f724aa229cbf75fb6a813282.tar.gz
cwm-9a7528f5b99bd234f724aa229cbf75fb6a813282.tar.xz
cwm-9a7528f5b99bd234f724aa229cbf75fb6a813282.zip
Check the atom type on propertynotify before iterating.
-rw-r--r--xevents.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/xevents.c b/xevents.c
index c5a2aad..4dfef72 100644
--- a/xevents.c
+++ b/xevents.c
@@ -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);
+		}
 	}
 }