aboutsummaryrefslogtreecommitdiff
path: root/protocols
diff options
context:
space:
mode:
authorKenny Levinsen <kl@kl.wtf>2025-03-12 16:35:41 +0100
committerAlexander Orzechowski <alex@ozal.ski>2025-03-21 21:08:04 -0400
commitc2d6aff64c1e265c8f1d95b780b54193defae18a (patch)
treeaefae9c2e9a8bc4f77fc60a51e612e7828bbff07 /protocols
parent4b185a0fe0031455d5ceab1eda2b9d9ffe0c81de (diff)
Avoid crashing on too many containers
If far too many containers are created, they can become so small that their size calculations come out negative, leading to crashes on asserts. Instead, set a lower bound for sizes and disable the container entirely if it goes below it, giving whatever space it used to the last container. The splits are not recalculated, so currently the effect is that if all containers have the same width fraction, they keep getting narrower until at some point they all round to zero and the last container will be given all the available space. A better behavior would have been if the additional container did not contribute to size and fraction calculations at all, but it's an extreme edge-case, anything is better than crashing, and this is easier to implement.
Diffstat (limited to 'protocols')
0 files changed, 0 insertions, 0 deletions