Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Closes issue #222.

  • Loading branch information...
commit 648ce9b1b1c94fd775b9f8541437b06b577e07fc 1 parent e337180
Kris Maglione authored
Showing with 24 additions and 1 deletion.
  1. +23 −1 cmd/wmii/column.c
  2. +1 −0  cmd/wmii/fns.h
View
24 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*);
View
1  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*);
Please sign in to comment.
Something went wrong with that request. Please try again.