From dc39f583f4f43df0cac977f456a258909b8340ac Mon Sep 17 00:00:00 2001 From: Patrick Jakobsen Date: Thu, 28 Sep 2023 15:43:47 +0200 Subject: [PATCH] Subtrees get dirtied when their clipnodes do --- gui/gui.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/gui/gui.c b/gui/gui.c index 08a0350..e4c4b59 100644 --- a/gui/gui.c +++ b/gui/gui.c @@ -925,9 +925,14 @@ void gui_generate_draw_commands( assert(out_num_draw_commands != NULL); *out_num_draw_commands = 0; memory_arena_reset(draw_command_arena); + bool dirtyness = root->dirty; + GUI_Node_Reference clipnode = subtree->clipnode; + if(rdic_node_reference_valid(clipnode.rdic_ref)) { + dirtyness |= clipnode.node->dirty; + } gui_generate_draw_commands_inner( x_offset, y_offset, - root, root->dirty, + root, dirtyness, draw_command_arena, out_num_draw_commands); } @@ -3388,7 +3393,7 @@ void gui_draw_rect_clipped( } } } -//CURSOR + void gui_layout_and_draw_subtree( GUI_Context *context, GUI_Subtree *subtree,