Skip to content

windowPreview: Fix a division by zero

When the bounding box size is 0 during allocation (which happens right after creating a window for example), we're doing a division by zero and end up with a NaN scale. This ends up making the childBox NaN, which triggers an error in Clutters allocation machinery.

So fix that and fall back to a scale of 1 in case the bounding box is empty.

Merge request reports