From 5adb7ba8c1d69d94b29ad2d0c331c29a67db588c Mon Sep 17 00:00:00 2001 From: BayLee4 <63376748+BayLee4@users.noreply.github.com> Date: Sat, 28 Sep 2024 00:04:43 +0200 Subject: [PATCH] fix(macos): Touch input broken --- src/platform/macos/input.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/platform/macos/input.cpp b/src/platform/macos/input.cpp index 83c668eb20d..6be72233a6e 100644 --- a/src/platform/macos/input.cpp +++ b/src/platform/macos/input.cpp @@ -362,6 +362,9 @@ const KeyCodeMap kKeyCodesMap[] = { CGEventSetDoubleValueField(event, kCGMouseEventDeltaY, deltaY); CGEventPost(kCGHIDEventTap, event); + // For why this is here, see: + // https://stackoverflow.com/questions/15194409/simulated-mouseevent-not-working-properly-osx + CGWarpMouseCursorPosition(location); } inline CGEventType