Kirill Grouchnikov
10/07/2021, 7:16 PMComposeWindow
that gets parent composition is gone. But it's still there in https://github.com/androidx/androidx/blob/androidx-main/compose/ui/ui/src/desktopMain/kotlin/androidx/compose/ui/awt/ComposeWindow.desktop.kt#L85. Is there a different branch that 396 is cut from, and if so, what is the new way to propagate all composition locals from the parent window to the new window?Igor Demin
10/08/2021, 9:03 AMIs there a different branch that 396 is cut fromWe build from https://github.com/JetBrains/androidx/tree/jb-main, which contains a new API, that is not yet merged to androidx (we mark it as Experimental), and several bugfixes.
that gets parent composition is goneUse currentCompositionLocals. It is not a final API though, and probably will be changed soon. We rushed to change it because of the very ugly bug with high CPU usage. Parent composition doesn't work well if we pass it from
application
to Window
or from Window
to Window
(it provides a wrong frame clock), and we decide to remove it from API, until we figure out how to properly fix it (a proper fix isn't trivial)Kirill Grouchnikov
10/08/2021, 2:08 PMUnresolved reference: currentCompositionLocals
Igor Demin
10/21/2021, 6:33 PMval currentLocalContext by rememberUpdatedState(currentCompositionLocalContext)
...
CompositionLocalProvider(currentLocalContext ) {
...
}
It was the last breaking change, as it was merged to aosp )Kirill Grouchnikov
10/21/2021, 6:47 PMWindow.desktop.kt
sources in JetBrains/androidx
for reference, but they are still in the "old" worldIgor Demin
10/21/2021, 6:52 PMCompositionLocalProvider
directly, use window.compositionLocalContext =
)
Suggest do the same in Aurora 🙂Kirill Grouchnikov
11/12/2021, 1:51 PM