Subtrees get dirtied when their clipnodes do

This commit is contained in:
Patrick Jakobsen committed 2023-09-28 15:43:47 +02:00
1 parent b2b8e68046
commit dc39f583f4
1 file changed
+7 -2
+7 -2
View File
@@ -925,9 +925,14 @@ void gui_generate_draw_commands(
assert(out_num_draw_commands != NULL); assert(out_num_draw_commands != NULL);
*out_num_draw_commands = 0; *out_num_draw_commands = 0;
memory_arena_reset(draw_command_arena); 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( gui_generate_draw_commands_inner(
x_offset, y_offset, x_offset, y_offset,
root, root->dirty, root, dirtyness,
draw_command_arena, out_num_draw_commands); draw_command_arena, out_num_draw_commands);
} }
@@ -3388,7 +3393,7 @@ void gui_draw_rect_clipped(
} }
} }
} }
//CURSOR
void gui_layout_and_draw_subtree( void gui_layout_and_draw_subtree(
GUI_Context *context, GUI_Context *context,
GUI_Subtree *subtree, GUI_Subtree *subtree,