https://kotlinlang.org logo
Title
l

Lucas

07/14/2022, 1:29 PM
Can i minimize a
ComposeDialog
?
Like
WindowState
has
isMinimized
but
DialogState
doesnt
Ended up solving it with
window.addWindowFocusListener(object : WindowFocusListener{
    override fun windowGainedFocus(e: WindowEvent?) {
        windowState.size = DpSize(size)
    }

    override fun windowLostFocus(e: WindowEvent?) {
        windowState.size = DpSize(0.dp, 0.dp)
    }
})
d

Dragos Rachieru

07/14/2022, 2:51 PM
Why don't you use visibility for that, or just put an if(condition) to draw on recomposition
🤯 1
l

Lucas

07/14/2022, 3:56 PM
Completely forgot about window.isVisible property. the if wouldnt work because i dont want to trigger recomposition effects
👍🏻 1