Skip to content

Fix shrinking windows when suspending

Jonas Ådahl requested to merge jadahl/gtk:wip/handle-zero-bounds into main

When suspended, if a window is for some reason configured by the compositor, the compositor will likely send the bounds 0 x 0, which should be interpreted as "no particular bounds to report". However, in GTK this was still used in more or less a MAX (min_size, MIN (bounds, natural_size)) kind of way, which made affected windows shrink to their min sizes.

This merge request more or less changes the zeros to INT_MAX so that we don't attempt to clamp when there is nothing to clamp to. In future configuration sequences, we'll still receive bounds, which GTK can react to.

Merge request reports