wmii

git clone git://oldgit.suckless.org/wmii/
Log | Files | Refs | README | LICENSE

commit a2f90882451d498488ee2aa450d305e01913822b
parent 82e93cb5f2b338e846302d33e78c06118411f801
Author: Kris Maglione <kris@suckless.org>
Date:   Thu, 21 Apr 2011 09:07:19 -0400

Add ViewAttach, ViewDetach, AreaAttach, and AreaDetach events.

Diffstat:
alternative_wmiircs/python/wmiirc.py | 2+-
cmd/menu/menu.c | 6++----
cmd/wmii/area.c | 2++
cmd/wmii/view.c | 2++
4 files changed, 7 insertions(+), 5 deletions(-)

diff --git a/alternative_wmiircs/python/wmiirc.py b/alternative_wmiircs/python/wmiirc.py @@ -309,7 +309,7 @@ if not os.environ.get('WMII_NOPLUGINS', ''): reduce(operator.add, map(os.listdir, dirs), [])) for f in ['wmiirc_local'] + ['plugins.%s' % file[:-3] for file in files]: try: - exec 'import %s' % f + __import__(f) except Exception, e: traceback.print_exc(sys.stdout) diff --git a/cmd/menu/menu.c b/cmd/menu/menu.c @@ -76,10 +76,8 @@ slice(Rectangle *rp, int x, int y) { Rectangle r; r = *rp; - if(x) - rp->min.x += x, r.max.x = min(rp->min.x, rp->max.x); - if(y) - rp->min.y += y, r.max.y = min(rp->min.y, rp->max.y); + if(x) rp->min.x += x, r.max.x = min(rp->min.x, rp->max.x); + if(y) rp->min.y += y, r.max.y = min(rp->min.y, rp->max.y); return r; } diff --git a/cmd/wmii/area.c b/cmd/wmii/area.c @@ -254,6 +254,7 @@ area_attach(Area *a, Frame *f) { column_attach(a, f); view_arrange(a->view); + event("AreaAttach %s %a %#C\n", a->view->name, a, f->client); if(btassert("4 full", a->frame && a->sel == nil)) a->sel = a->frame; @@ -267,6 +268,7 @@ area_detach(Frame *f) { a = f->area; v = a->view; + event("AreaDetach %s %a %#C\n", v->name, a, f->client); if(a->floating) float_detach(f); else diff --git a/cmd/wmii/view.c b/cmd/wmii/view.c @@ -391,6 +391,7 @@ view_attach(View *v, Frame *f) { if(!a->floating && c->floating != Never && view_fullscreen_p(v, a->screen)) a = v->floating; + event("ViewAttach %s %#C\n", v->name, c); area_attach(a, f); /* TODO: Decide whether to focus this frame */ bool newgroup = !c->group @@ -430,6 +431,7 @@ view_detach(Frame *f) { if(c->sel == f) c->sel = f->cnext; + event("ViewDetach %s %#C\n", v->name, c); if(v == selview) view_update(v); else if(empty_p(v))