← Back to Compose UI
WindowFocusObserver
Component
in
Compose UI
. Since 1.0.0-alpha08Overview
Examples
Community Notes
Provides a callback that is called whenever the window gains or loses focus.
Overloads
WindowFocusObserver
@Deprecated(
message = "Use AmbientWindowInfo.current.isWIndowFocused instead.",
level = DeprecationLevel.ERROR
)
@Composable
fun WindowFocusObserver(onWindowFocusChanged: (isWindowFocused: Boolean) -> Unit)
Previous Component← VectorPainter
Next ComponentWithConstraints →