On Sun, Mar 27, 2011 at 1:04 AM, Suraj Kurapati <sun...@gmail.com> wrote:
> The following patch against wmii-hg r2785 allows my wmiirc to know
> when clients are added to or removed from the current view.

Here is an updated patch 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.  Cheers.

ff -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;

Reply via email to