wmii

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

commit ecaa8861c1c6f980d077d3babbe112b018b73cf2
parent d40f0a0c108f1ca3372bdf737b0236db81161205
Author: Kris Maglione <kris@suckless.org>
Date:   Mon, 19 Sep 2011 16:25:11 -0400

Closes issue #222.

Diffstat:
cmd/wmii/column.c | 24+++++++++++++++++++++++-
cmd/wmii/fns.h | 1+
2 files changed, 24 insertions(+), 1 deletion(-)

diff --git a/cmd/wmii/column.c b/cmd/wmii/column.c @@ -72,6 +72,18 @@ column_minwidth(void) return 4 * labelh(def.font); } +static void +columns_update(View *v) { + Area *a; + Frame *f; + int s; + + foreach_frame(v, s, a, f) { + f->screen = s; + f->column = area_idx(a); + } +} + Area* column_new(View *v, Area *pos, int scrn, uint w) { Area *a; @@ -84,6 +96,7 @@ column_new(View *v, Area *pos, int scrn, uint w) { return nil; view_arrange(v); + columns_update(v); view_update(v); #endif } @@ -102,6 +115,15 @@ column_insert(Area *a, Frame *f, Frame *pos) { } void +column_destroy(Area *a) { + View *v; + + v = a->view; + area_destroy(a); + columns_update(v); +} + +void column_attach(Area *a, Frame *f) { Frame *first; int nframe, dy, h; @@ -135,7 +157,7 @@ column_detach(Frame *f) { stack_scale(first, dy); column_arrange(a, false); }else if(a->view->areas[a->screen]->next) - area_destroy(a); + column_destroy(a); } static void column_scale(Area*); diff --git a/cmd/wmii/fns.h b/cmd/wmii/fns.h @@ -113,6 +113,7 @@ char* column_getmode(Area*); void column_arrange(Area*, bool dirty); void column_attach(Area*, Frame*); void column_attachrect(Area*, Frame*, Rectangle); +void column_destroy(Area*); void column_detach(Frame*); void column_frob(Area*); void column_insert(Area*, Frame*, Frame*);