attempt to lessen screentearing
This commit is contained in:
parent
9a6786b2b5
commit
7a35f96a9a
4 changed files with 96 additions and 35 deletions
61
cli/main.c
61
cli/main.c
|
|
@ -23,43 +23,44 @@ int main(int argc, char **argv) {
|
|||
init_pair(5, COLOR_BLACK, COLOR_YELLOW);
|
||||
|
||||
struct ct_node *const child1 = new_node(bounds_none(), tree->root);
|
||||
struct ct_node *const child2 = new_node(bounds_none(), tree->root);
|
||||
struct ct_node *const child3 = new_node(bounds_none(), tree->root);
|
||||
struct ct_node *const child4 = new_node(bounds_none(), tree->root);
|
||||
struct ct_node *const child5 = new_node(bounds_none(), tree->root);
|
||||
// struct ct_node *const child2 = new_node(bounds_none(), tree->root);
|
||||
// struct ct_node *const child3 = new_node(bounds_none(), tree->root);
|
||||
// struct ct_node *const child4 = new_node(bounds_none(), tree->root);
|
||||
// struct ct_node *const child5 = new_node(bounds_none(), tree->root);
|
||||
append_child_node(tree->root, child1);
|
||||
append_child_node(tree->root, child2);
|
||||
append_child_node(tree->root, child3);
|
||||
append_child_node(tree->root, child4);
|
||||
append_child_node(tree->root, child5);
|
||||
// append_child_node(tree->root, child2);
|
||||
// append_child_node(tree->root, child3);
|
||||
// append_child_node(tree->root, child4);
|
||||
// append_child_node(tree->root, child5);
|
||||
|
||||
wbkgd(child1->surface->win, COLOR_PAIR(1));
|
||||
wbkgd(child2->surface->win, COLOR_PAIR(2));
|
||||
wbkgd(child3->surface->win, COLOR_PAIR(3));
|
||||
wbkgd(child4->surface->win, COLOR_PAIR(4));
|
||||
wbkgd(child5->surface->win, COLOR_PAIR(5));
|
||||
// wbkgd(child2->surface->win, COLOR_PAIR(2));
|
||||
// wbkgd(child3->surface->win, COLOR_PAIR(3));
|
||||
// wbkgd(child4->surface->win, COLOR_PAIR(4));
|
||||
// wbkgd(child5->surface->win, COLOR_PAIR(5));
|
||||
|
||||
child3->axis = AXIS_Y;
|
||||
struct ct_node *const child3_1 = new_node(bounds_none(), child3);
|
||||
struct ct_node *const child3_2 = new_node(bounds_none(), child3);
|
||||
append_child_node(child3, child3_1);
|
||||
append_child_node(child3, child3_2);
|
||||
wbkgd(child3_1->surface->win, COLOR_PAIR(1));
|
||||
wbkgd(child3_2->surface->win, COLOR_PAIR(5));
|
||||
// child3->axis = AXIS_Y;
|
||||
// struct ct_node *const child3_1 = new_node(bounds_none(), child3);
|
||||
// struct ct_node *const child3_2 = new_node(bounds_none(), child3);
|
||||
// append_child_node(child3, child3_1);
|
||||
// append_child_node(child3, child3_2);
|
||||
// wbkgd(child3_1->surface->win, COLOR_PAIR(1));
|
||||
// wbkgd(child3_2->surface->win, COLOR_PAIR(5));
|
||||
|
||||
while (1) {
|
||||
nprintsfdims(child2, 0, "R", tree->root);
|
||||
nprintsfdims(child2, 1, "1", child1);
|
||||
nprintsfdims(child2, 2, "2", child2);
|
||||
nprintsfdims(child2, 3, "3", child3);
|
||||
nprintsfdims(child2, 4, "4", child4);
|
||||
nprintsfdims(child2, 5, "5", child5);
|
||||
|
||||
nprintsfdims(child2, 7, "3_1", child3_1);
|
||||
nprintsfdims(child2, 8, "3_2", child3_2);
|
||||
|
||||
|
||||
ct_update(tree);
|
||||
|
||||
// nprintsfdims(child2, 0, "R", tree->root);
|
||||
// nprintsfdims(child2, 1, "1", child1);
|
||||
// nprintsfdims(child2, 2, "2", child2);
|
||||
// nprintsfdims(child2, 3, "3", child3);
|
||||
// nprintsfdims(child2, 4, "4", child4);
|
||||
// nprintsfdims(child2, 5, "5", child5);
|
||||
|
||||
// nprintsfdims(child2, 7, "3_1", child3_1);
|
||||
// nprintsfdims(child2, 8, "3_2", child3_2);
|
||||
|
||||
ct_process(tree);
|
||||
}
|
||||
|
||||
destroy_tree(tree);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue