some more changes, still unfinished (/me has to run now)

This commit is contained in:
Anselm R. Garbe 2006-05-30 19:13:33 +02:00
parent e01ca2506a
commit bfa0c759f4
2 changed files with 28 additions and 1 deletions

View File

@ -235,9 +235,29 @@ place_client(Area *a, Client *c)
free(rects);
}
static unsigned int
ncol_of_view(View *v)
{
unsigned int i, n;
regmatch_t tmpregm;
for(i = 0; i < vrule.size; i++) {
Rule *r = vrule.data[i];
if(!regexec(&r->regex, v->name, 1, &tmpregm, 0)) {
if(sscanf(r->values, "%u", &n) == 1) {
fprintf(stderr, "r->values=%s n=%d\n", r->values, n);
return n;
}
fprintf(stderr, "r->values=%s n=%d\n", r->values, n);
}
}
return 0;
}
void
attach_to_area(Area *a, Client *c)
{
View *v = a->view;
unsigned int h = 0, aidx = idx_of_area(a);
Frame *f;
@ -248,6 +268,13 @@ attach_to_area(Area *a, Client *c)
scale_column(a, a->rect.height - h);
}
if(aidx) { /* column */
unsigned int nc = ncol_of_view(v);
fprintf(stderr, "nc=%d v->area.size=%d\n", nc, v->area.size);
if(nc && nc > v->area.size - 1)
a = create_area(v, v->sel);
}
f = create_frame(a, c);
if(aidx) { /* column */

View File

@ -38,7 +38,7 @@ update_rules(RuleVector *rule, const char *data)
free(rul);
}
for(p = def.rules; *p; p++)
for(p = (char *)data; *p; p++)
switch(mode) {
case IGNORE:
if(*p == '/') {