boxlayout: Do not infloop
authorBenjamin Otte <otte@redhat.com>
Tue, 26 Apr 2022 17:51:16 +0000 (19:51 +0200)
committerBenjamin Otte <otte.benjamin@googlemail.com>
Tue, 26 Apr 2022 21:11:32 +0000 (21:11 +0000)
commitae0166973795e750f08b89f9f0ef974d7ac48bc7
tree3396e2eb70246f7b627ac7b5ec4d75dc7aa61532
parent21103ad8116a9d51aec4fc694268b6d066e679ae
boxlayout: Do not infloop

if the loop for determining max width grows too big, print an error and
abort assuming that a satisfactory value was reached.

This will cause wrong layout and might cause widgets to overlap, but it
will not infloop.

It actually works around and doesn't really fix the primary cause of the
following bugs, but good enough to close them:

Fixes: #4252
Fixes: #4517
(cherry picked from commit 515b1f52929a189b858a38aba733a3e7d2375fbc)
gtk/gtkboxlayout.c