Hey everyone! I see that `LocalWindowInfo.current....
# compose-desktop
d
Hey everyone! I see that
LocalWindowInfo.current.containerSize
is initially (0, 0). So I am forced to do
Copy code
Window(...) { if (LocalWindowInfo.current.containerSize != IntSize(0, 0)) { App() } }
so that
currentWindowAdaptiveInfo()
doesn't return a
COMPACT
window class at first composition. Am I doing something wrong or is this expected?
a
It’s probably because we run the first composition before the window is shown, so that we can draw it right away when the window becomes visible, and there’s no flashing white background.
👍 2
d
I see. However, when we initialize the Window with
rememberWindowState
with explicit window size, couldn't that first composition be made with the correct
containerSize
even if the window is not shown? Currently, my adaptive layout (navigation3) does funky initialization because the
currentWindowAdaptiveInfo
reports a compact window size class. So I am forced to do the
if (...)
and maybe I myself risk a flashing white background (though I don't observe it currently...)?
a
Submit a bug report
👍 1
❤️ 1
👍🏽 1
d
@Alexander Maryanovsky ok, will do! Thank you very much for your very fast answer! ❤️