commonMain.com.arkivanov.decompose.extensions.compose.utils.InputConsumingOverlay.kt Maven / Gradle / Ivy
package com.arkivanov.decompose.extensions.compose.utils
import androidx.compose.foundation.layout.Box
import androidx.compose.runtime.Composable
import androidx.compose.ui.Modifier
import androidx.compose.ui.input.pointer.pointerInput
@Composable
internal fun InputConsumingOverlay(modifier: Modifier) {
Box(
modifier = modifier.pointerInput(Unit) {
awaitPointerEventScope {
while (true) {
val event = awaitPointerEvent()
event.changes.forEach { it.consume() }
}
}
}
)
}