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

This commit is contained in:
Kris Maglione 2007-02-10 23:18:31 -05:00
parent 0ca60e5f67
commit 4f951ec859
1 changed files with 8 additions and 13 deletions

19
area.c
View File

@ -40,11 +40,13 @@ create_area(View *v, Area *pos, unsigned int w) {
for(; a; a = a->next) area_num++; for(; a; a = a->next) area_num++;
col_num = max((area_num - 1), 0); col_num = max((area_num - 1), 0);
if(!w) { if(w == 0) {
if(area_num) if(area_num) {
w = newcolw_of_view(v);
if (w == 0)
w = screen->rect.width / (col_num + 1); w = screen->rect.width / (col_num + 1);
else }
w = screen->rect.width; else w = screen->rect.width;
} }
if(w < min_width) if(w < min_width)
w = min_width; w = min_width;
@ -119,7 +121,7 @@ send_to_area(Area *to, Area *from, Frame *f) {
void void
attach_to_area(Area *a, Frame *f, Bool send) { attach_to_area(Area *a, Frame *f, Bool send) {
unsigned int w, h, n_frame; unsigned int h, n_frame;
Frame *ft; Frame *ft;
Client *c; Client *c;
View *v; View *v;
@ -128,13 +130,6 @@ attach_to_area(Area *a, Frame *f, Bool send) {
c = f->client; c = f->client;
h = 0; 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; f->area = a;
n_frame = 1; n_frame = 1;