https://kotlinlang.org logo
#compose-desktop
Title
# compose-desktop
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
Copy code
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
6 Views