rename (Un)MapClient events to ClientAttach/Detach
rename (Un)MapClient events to ClientAttach/Detach

Here is an updated patch to wmii-hg r2785 that renames the events to
ClientAttach and ClientDetach and, more importantly, fires those events
only when the current view is actually changed.  No need for special
logic to detect valid boundaries of MapClient and UnmapClient events.

diff -r bb26a51ba0c3 cmd/wmii/view.c
--- a/cmd/wmii/view.c	Sun Mar 27 14:18:21 2011 -0700
+++ b/cmd/wmii/view.c	Mon Mar 28 15:41:56 2011 -0700
@@ -363,6 +363,9 @@

 	c = f->client;

+	if (v == selview)
+	  event("ClientAttach %#C\n", c);
+
 	oldsel = v->oldsel;
 	a = v->sel;
 	if(c->floating == Never)
@@ -426,6 +429,9 @@
 	v = f->view;
 	c = f->client;

+	if (v == selview)
+	  event("ClientDetach %#C\n", c);
+
 	area_detach(f);
 	if(c->sel == f)
 		c->sel = f->cnext;

sunaku/wmiirc,sunaku/wmiirc