407 int span_max = 1; |
407 int span_max = 1; |
408 for(int r=0;r<2;r++) { |
408 for(int r=0;r<2;r++) { |
409 for(int i=0;i<w->composite.num_children;i++) { |
409 for(int i=0;i<w->composite.num_children;i++) { |
410 Widget child = w->composite.children[i]; |
410 Widget child = w->composite.children[i]; |
411 GridConstraintRec *constraints = child->core.constraints; |
411 GridConstraintRec *constraints = child->core.constraints; |
|
412 if(constraints->grid.pref_width == 0) { |
|
413 constraints->grid.pref_width = child->core.width; |
|
414 } |
|
415 if(constraints->grid.pref_height == 0) { |
|
416 constraints->grid.pref_height = child->core.height; |
|
417 } |
412 |
418 |
413 if(constraints->grid.colspan > span_max || constraints->grid.rowspan > span_max) { |
419 if(constraints->grid.colspan > span_max || constraints->grid.rowspan > span_max) { |
414 continue; |
420 continue; |
415 } |
421 } |
416 |
422 |
616 } else { |
622 } else { |
617 height = r.size - w->mywidget.rowspacing; |
623 height = r.size - w->mywidget.rowspacing; |
618 } |
624 } |
619 } |
625 } |
620 |
626 |
621 XtConfigureWidget(child, x, y, width, height, child->core.border_width); |
627 if(width > 0 && height > 0) { |
|
628 XtConfigureWidget(child, x, y, width, height, child->core.border_width); |
|
629 } |
622 //printf("child %d %d - %d %d\n", (int)child->core.x, (int)child->core.y, (int)child->core.width, (int)child->core.height); |
630 //printf("child %d %d - %d %d\n", (int)child->core.x, (int)child->core.y, (int)child->core.width, (int)child->core.height); |
623 } |
631 } |
624 |
632 |
625 free(cols); |
633 free(cols); |
626 free(rows); |
634 free(rows); |