in hot-reload-devtools/src/main/kotlin/org/jetbrains/compose/devtools/sidecar/DtNotificationsWindow.kt [80:102]
fun DtNotificationsWindow(onClose: () -> Unit) {
val controller = LocalDtNotificationsWindowController.current
Window(
onCloseRequest = onClose,
state = rememberWindowState(
size = DtSizes.defaultWindowSize,
position = WindowPosition.Aligned(Alignment.Center)
),
title = "${DtTitles.COMPOSE_HOT_RELOAD} Notifications"
) {
LaunchedEffect(Unit) {
controller.focusRequests.collectLatest {
if (controller.isOpen.value) {
window.toFront()
window.requestFocus()
}
}
}
DtNotificationsWindowContent()
}
}