by @alexstyl
✉️ Leave your feedback

← Back to Compose UI

WindowFocusObserver

Component
in
Compose UI
. Since 1.0.0-alpha08

Overview

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 ComponentVectorPainter
Next ComponentWithConstraints