I've noticed that the new Window API in Compose fo...
# compose-desktop
d
I've noticed that the new Window API in Compose for Desktop appears to break animations in my App 😱, or at least make them very flaky. I have an
AnimatedContent
driven slide transition between master/detail views. When starting the app with the old
Window { <content> }
function, it is reliable and silky smooth 👌. Now when starting with
application { Window { <content> } }
the animation works maybe 1 in every 10 triggers. The content is all the same... Is this a known issue; any likely causes? Using
1.0.0-alpha4-build344
i
Will the problem disappear if you use this instead of the new Window API?
Copy code
import androidx.compose.ui.awt.ComposeWindow
import java.awt.Dimension
import javax.swing.SwingUtilities

fun main() = SwingUtilities.invokeLater {
    ComposeWindow().apply {
        size = Dimension(500, 500)
        setContent {

        }
        isVisible = true
    }
}
If it will disappear then it is because of this issue (I am trying to fix it now)
👍 1
d
Yes, I started my App & same content using your provided snippet @Igor Demin; it is smooth 👍
...and yes I am on Mac.
Good to know, thanks for the quick reply, will await fix in a future build 🙂
i
Thanks for the info 🙂 . It is a very ugly bug and definitely will be fixed as soon as possible. I just ran into some issues that prevented me to fix it quickly.