From b8dd756393b9d9a8e9689a9f6cdbe470d2f88692 Mon Sep 17 00:00:00 2001 From: SerVB Date: Tue, 21 Jul 2020 14:21:52 +0300 Subject: [PATCH] PRJ-92 Clarify which drag event is generated: touch or mouse --- .../jetbrains/projector/client/web/input/InputController.kt | 2 +- .../jetbrains/projector/common/protocol/handshake/Constant.kt | 3 ++- .../projector/common/protocol/toServer/ClientEvent.kt | 1 + 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/projector-client-web/src/main/kotlin/org/jetbrains/projector/client/web/input/InputController.kt b/projector-client-web/src/main/kotlin/org/jetbrains/projector/client/web/input/InputController.kt index 20bf5ead6..ea87296fe 100644 --- a/projector-client-web/src/main/kotlin/org/jetbrains/projector/client/web/input/InputController.kt +++ b/projector-client-web/src/main/kotlin/org/jetbrains/projector/client/web/input/InputController.kt @@ -81,7 +81,7 @@ class InputController(private val openingTimeStamp: Int, eventsInterceptor!!.onMouseMove(touch.clientX, touch.clientY) } else { - fireMouseEvent(ClientMouseEvent.MouseEventType.DRAG, event, touch) + fireMouseEvent(ClientMouseEvent.MouseEventType.TOUCH_DRAG, event, touch) } } } diff --git a/projector-common/src/commonMain/kotlin/org/jetbrains/projector/common/protocol/handshake/Constant.kt b/projector-common/src/commonMain/kotlin/org/jetbrains/projector/common/protocol/handshake/Constant.kt index b4e81af42..0fc6b091d 100644 --- a/projector-common/src/commonMain/kotlin/org/jetbrains/projector/common/protocol/handshake/Constant.kt +++ b/projector-common/src/commonMain/kotlin/org/jetbrains/projector/common/protocol/handshake/Constant.kt @@ -35,5 +35,6 @@ val COMMON_VERSION = listOf(ServerEvent.serializer(), ClientEvent.serializer()) // Don't change order here: it's used to obtain readable "human id" val commonVersionList = listOf( -1663032476, - 615706807 + 615706807, + 891030124 ) diff --git a/projector-common/src/commonMain/kotlin/org/jetbrains/projector/common/protocol/toServer/ClientEvent.kt b/projector-common/src/commonMain/kotlin/org/jetbrains/projector/common/protocol/toServer/ClientEvent.kt index 2301aa208..ee281d00f 100644 --- a/projector-common/src/commonMain/kotlin/org/jetbrains/projector/common/protocol/toServer/ClientEvent.kt +++ b/projector-common/src/commonMain/kotlin/org/jetbrains/projector/common/protocol/toServer/ClientEvent.kt @@ -72,6 +72,7 @@ data class ClientMouseEvent( enum class MouseEventType { MOVE, DRAG, + TOUCH_DRAG, DOWN, UP, CLICK,