Add the ability to "pack" a window while allowing its content to match the window size
Due to how Compose layouts work, together with the way WindowState(size=DpSize.Unspecified) is implemented, it's not currently possible to say "I want to size the window to its preferred size, but when the user resizes it, the content should match the window size. The latter requires the content to be fillMaxSize(), but this causes size=DpSize.Unspecified to set the window size to match the screen.
The solution can be to have ComposeLayer.preferredSize() return the min intrinsic size of the content.
We would also need to design an API how the user can specify this behavior, unless we want to just replace the current size=DpSize.Unspecified behavior.
A proof-of-concept that just replaces the size=DpSize.Unspecified functionality:
0001-WIP-Report-the-ComposeLayer-s-preferred-size-to-be-t.patch
Related: https://github.com/JetBrains/compose-multiplatform-core/pull/884
@Walingar FYI