Replies: 1 comment
-
With AWT API: fun main() = singleWindowApplication {
window.addWindowFocusListener(object : WindowFocusListener {
override fun windowGainedFocus(e: WindowEvent) { println("focusGained") }
override fun windowLostFocus(e: WindowEvent) { println("focusLost") }
})
App()
} Starting since LifecycleResumeEffect(Unit) {
println("on resume")
onPauseOrDispose {
println("on pause")
}
} |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I have a Compose-desktop app with multiple windows. I'd like to catch a moment when one of them is become active (getting focus).
Beta Was this translation helpful? Give feedback.
All reactions