Improve state and size handling.

See also gtk#3226.
1 job for arnaudb/wip/gtk4 in 1 minute and 51 seconds
latest
Status Job ID Name Coverage
  Test
passed #956055
flatpak
flatpak

00:01:51