From 039b1ce7741f62cd313ce5e9909935ea1f093174 Mon Sep 17 00:00:00 2001 From: Wojciech Gryglas Date: Thu, 28 Oct 2021 21:03:53 +0200 Subject: [PATCH] Cleanup redundant code (#1323) --- .../lwjgl-integration/src/main/kotlin/GlfwEvents.kt | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/experimental/lwjgl-integration/src/main/kotlin/GlfwEvents.kt b/experimental/lwjgl-integration/src/main/kotlin/GlfwEvents.kt index fd340c3b5e..92cbd7763b 100644 --- a/experimental/lwjgl-integration/src/main/kotlin/GlfwEvents.kt +++ b/experimental/lwjgl-integration/src/main/kotlin/GlfwEvents.kt @@ -15,11 +15,6 @@ import java.awt.event.MouseEvent @OptIn(ExperimentalComposeUiApi::class) fun ComposeScene.subscribeToGLFWEvents(windowHandle: Long) { glfwSetMouseButtonCallback(windowHandle) { _, button, action, mods -> - when (action) { - GLFW_PRESS -> PointerEventType.Press - GLFW_RELEASE -> PointerEventType.Release - else -> PointerEventType.Unknown - } sendPointerEvent( position = glfwGetCursorPos(windowHandle), eventType = when (action) { @@ -121,4 +116,4 @@ private fun getAwtMods(windowHandle: Long): Int { if (glfwGetKey(windowHandle, GLFW_KEY_LEFT_ALT) == GLFW_PRESS || glfwGetKey(windowHandle, GLFW_KEY_RIGHT_ALT) == GLFW_PRESS) awtMods = awtMods or InputEvent.ALT_DOWN_MASK return awtMods -} \ No newline at end of file +}