Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -300,7 +300,11 @@ internal class RootNodeOwner(
@OptIn(InternalCoreApi::class)
fun onPointerInput(event: PointerInputEvent): PointerEventResult {
if (event.button != null) {
platformContext.inputModeManager.requestInputMode(InputMode.Touch)
if (event.pointers.any { it.type != PointerType.Touch }) {
platformContext.inputModeManager.requestInputMode(InputMode.Keyboard)
} else {
platformContext.inputModeManager.requestInputMode(InputMode.Touch)
}
}
val isInBounds = event.eventType != PointerEventType.Exit &&
event.pointers.fastAll { isInBounds(it.position) }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ interface PlatformContext {
}

companion object {
val Empty = object : PlatformContext {
val Empty get() = object : PlatformContext {
override val windowInfo: WindowInfo = WindowInfoImpl().apply {
// true is a better default if platform doesn't provide WindowInfo.
// otherwise UI will be rendered always in unfocused mode
Expand Down
Loading