[hackers] [wmii] Change the behavior or colrules to size new columns, but not create them. colrules may be removed later.

From: Kris Maglione <jg_AT_suckless.org>
Date: Sun Feb 11 05:20:40 2007

changeset: 1839:63396701503a
tag: tip
user: Kris Maglione <jg_AT_suckless.org>
date: Sat Feb 10 23:18:31 2007 -0500
summary: Change the behavior or colrules to size new columns, but not create them. colrules may be removed later.

diff -r 7f582b9500e1 -r 63396701503a area.c
--- a/area.c Sat Feb 10 23:11:35 2007 -0500
+++ b/area.c Sat Feb 10 23:18:31 2007 -0500
@@ -40,11 +40,13 @@ create_area(View *v, Area *pos, unsigned
         for(; a; a = a->next) area_num++;
 
         col_num = max((area_num - 1), 0);
- if(!w) {
- if(area_num)
- w = screen->rect.width / (col_num + 1);
- else
- w = screen->rect.width;
+ if(w == 0) {
+ if(area_num) {
+ w = newcolw_of_view(v);
+ if (w == 0)
+ w = screen->rect.width / (col_num + 1);
+ }
+ else w = screen->rect.width;
         }
         if(w < min_width)
                 w = min_width;
@@ -119,7 +121,7 @@ send_to_area(Area *to, Area *from, Frame
 
 void
 attach_to_area(Area *a, Frame *f, Bool send) {
- unsigned int w, h, n_frame;
+ unsigned int h, n_frame;
         Frame *ft;
         Client *c;
         View *v;
@@ -128,13 +130,6 @@ attach_to_area(Area *a, Frame *f, Bool s
         c = f->client;
         h = 0;
 
- if(!a->floating && !send) {
- w = newcolw_of_view(v);
- if(w && v->area->next->frame) {
- a = new_column(v, a, w);
- arrange_view(v);
- }
- }
         f->area = a;
 
         n_frame = 1;
Received on Sun Feb 11 2007 - 05:20:40 UTC

This archive was generated by hypermail 2.2.0 : Sun Jul 13 2008 - 15:55:10 UTC