[dev] Re: [PATCH] wmii - client mapping events

From: Suraj Kurapati <sunaku_AT_gmail.com>
Date: Mon, 28 Mar 2011 15:53:26 -0700

On Sun, Mar 27, 2011 at 1:04 AM, Suraj Kurapati <sunaku_AT_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;
Received on Tue Mar 29 2011 - 00:53:26 CEST

This archive was generated by hypermail 2.2.0 : Tue Mar 29 2011 - 01:00:05 CEST