Alexander Maryanovsky
05/06/2026, 9:58 AMDidier Villevalois
05/06/2026, 10:31 AMAlexander Maryanovsky
05/06/2026, 10:36 AMAlexander Maryanovsky
05/06/2026, 10:38 AMLocalWindowInfo API was written, because it was written for Android, where the window size is typically fixed.Didier Villevalois
05/06/2026, 10:41 AMcurrentAdaptiveWindowSizeClass() is based on LocalWindowInfo on desktop....Didier Villevalois
05/06/2026, 10:42 AMif is not pretty...Alexander Maryanovsky
05/06/2026, 10:43 AMDidier Villevalois
05/06/2026, 10:45 AMif I use to not do the first composition is the right way?Alexander Maryanovsky
05/06/2026, 10:46 AMif.
What I think you should be doing is using a “default” or “preferred” window size in the first composition. This will allow sizing the window to the content.Alexander Maryanovsky
05/06/2026, 10:47 AMAlexander Maryanovsky
05/06/2026, 10:47 AMDidier Villevalois
05/06/2026, 10:48 AMif (LocalWindowSize != 0,0) { App() }Didier Villevalois
05/06/2026, 10:48 AMAlexander Maryanovsky
05/06/2026, 10:48 AMIn essence, I doThat will make it impossible to size the window to the preferred content size.if (LocalWindowSize != 0,0) { App() }
Didier Villevalois
05/06/2026, 10:51 AMLocalWindowSize is 0,0) and at the second composition we are EXPANDED (for instance).Alexander Maryanovsky
05/06/2026, 10:55 AMAlexander Maryanovsky
05/06/2026, 10:56 AMDidier Villevalois
05/06/2026, 10:58 AMcurrentAdaptiveWindowInfo is supposed to do. Are you saying I should completely bypass compose-adaptive on desktop?Alexander Maryanovsky
05/06/2026, 11:00 AMI don’t know the window size class I need inside the composable tree.Someone should specify that.
Alexander Maryanovsky
05/06/2026, 11:02 AMDidier Villevalois
05/06/2026, 11:04 AMLocalWindowSize is always initialized to 0,0 at first composition anyway.