tiling: Throttle resizes

This commit is contained in:
Victoria Brekenfeld 2025-01-15 19:56:53 +01:00 committed by Victoria Brekenfeld
parent cf26fe1c07
commit 560d234036
2 changed files with 45 additions and 12 deletions

View file

@ -2589,8 +2589,18 @@ impl TilingLayout {
}
_ => unreachable!(),
}
let blocker = TilingLayout::update_positions(&self.output, &mut tree, gaps);
self.queue.push_tree(tree, None, blocker);
let should_configure =
tree.traverse_pre_order(&group_id)
.unwrap()
.all(|node| match node.data() {
Data::Mapped { mapped, .. } => mapped.latest_size_committed(),
_ => true,
});
if should_configure {
let blocker = TilingLayout::update_positions(&self.output, &mut tree, gaps);
self.queue.push_tree(tree, None, blocker);
}
return true;
}