summary refs log tree commit diff
path: root/xevents.c
diff options
context:
space:
mode:
authoroga <oga>2009-12-11 17:51:42 +0000
committeroga <oga>2009-12-11 17:51:42 +0000
commitb35cbf81d84c97e7c444aafe491597bd6db6cfab (patch)
tree185bdf2bf9abe166225ac24f10759bad29f82b78 /xevents.c
parent9b04930f24bb3acc3626f442eff074b6b80821f3 (diff)
downloadcwm-b35cbf81d84c97e7c444aafe491597bd6db6cfab.tar.gz
cwm-b35cbf81d84c97e7c444aafe491597bd6db6cfab.tar.xz
cwm-b35cbf81d84c97e7c444aafe491597bd6db6cfab.zip
Implement _NET_DESKTOP_NAMES, this one was a bit tricky since thespec
says that a pager can change the property at any time (most need a
clientmessage). So deal with property updates.

Needed to shuffle some of the other code around since we can't just use
shortcut_to_name[] everywhere now.

ok okan@
Diffstat (limited to 'xevents.c')
-rw-r--r--xevents.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/xevents.c b/xevents.c
index d52984a..8956477 100644
--- a/xevents.c
+++ b/xevents.c
@@ -170,6 +170,7 @@ static void
 xev_handle_propertynotify(XEvent *ee)
 {
 	XPropertyEvent		*e = &ee->xproperty;
+	struct screen_ctx	*sc;
 	struct client_ctx	*cc;
 
 	if ((cc = client_find(e->window)) != NULL) {
@@ -184,7 +185,17 @@ xev_handle_propertynotify(XEvent *ee)
 			/* do nothing */
 			break;
 		}
+	} else {
+		TAILQ_FOREACH(sc, &Screenq, entry) 
+			if (sc->rootwin == e->window)
+				goto test;
+		return;
+
+test:
+		if (e->atom == _NET_DESKTOP_NAMES)
+			group_update_names(sc);
 	}
+
 }
 
 void