[hackers] [wmii] Closes issue #222. || Kris Maglione

From: <hg_AT_suckless.org>
Date: Mon, 19 Sep 2011 22:25:14 +0200 (CEST)

changeset: 2800:8d9003516b68
tag: tip
user: Kris Maglione <kris_AT_suckless.org>
date: Mon Sep 19 16:25:11 2011 -0400
files: cmd/wmii/column.c cmd/wmii/fns.h
description:
Closes issue #222.

diff -r 5be87959705e -r 8d9003516b68 cmd/wmii/column.c
--- a/cmd/wmii/column.c Tue May 31 05:25:14 2011 +0000
+++ b/cmd/wmii/column.c Mon Sep 19 16:25:11 2011 -0400
@@ -72,6 +72,18 @@
         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 @@
                 return nil;
 
         view_arrange(v);
+ columns_update(v);
         view_update(v);
 #endif
 }
@@ -102,6 +115,15 @@
 }
 
 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 @@
                         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 -r 5be87959705e -r 8d9003516b68 cmd/wmii/fns.h
--- a/cmd/wmii/fns.h Tue May 31 05:25:14 2011 +0000
+++ b/cmd/wmii/fns.h Mon Sep 19 16:25:11 2011 -0400
@@ -113,6 +113,7 @@
 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*);
Received on Mon Sep 19 2011 - 22:25:14 CEST

This archive was generated by hypermail 2.2.0 : Mon Sep 19 2011 - 22:36:05 CEST