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>
Thu, 6 Oct 2022 08:42:32 +0000 (10:42 +0200)
commit47b7988ccb6116ad0f460783bb9bc08db80cbe9f
treee8730871ff5af708d9d5c2e928714ac9714c8595
parent79eab08797e1121f0fe7d84f570d28055d3f12b0
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.

(cherry picked from commit b3a3a6ceb19cdc00da0d201531cff93a059a86d3)
gdk/gdktoplevelsize.c