toplevel-size: Report zero bounds as infinite
authorJonas Ådahl <jadahl@gmail.com>
Fri, 30 Sep 2022 07:26:55 +0000 (09:26 +0200)
committerJonas Ådahl <jadahl@gmail.com>
Fri, 30 Sep 2022 07:31:40 +0000 (09:31 +0200)
commitb3a3a6ceb19cdc00da0d201531cff93a059a86d3
tree902c46e6e514d2f9ebf9c6f35097a84e55a0248f
parent148c1336745a043a9660da6c4734ed905c628130
toplevel-size: Report zero bounds as infinite

Empty/zero bounds are sent by the Wayland compositor if there are no
valid bounds to report, e.g. if there are no connected monitors. Report
this to GTK, which uses this to clamp calculated sizes, as INT_MAX, so
that clamping isn't done until there are actual valid bounds to clamp
to.

This fixes clients sometimes shrinking to their minimum size during
hotplugs or after having suspended the session.
gdk/gdktoplevelsize.c