From 5bc32cdeb355d16e871dc47ef6048c644831475f Mon Sep 17 00:00:00 2001 From: BayLee4 <63376748+BayLee4@users.noreply.github.com> Date: Sun, 29 Sep 2024 17:59:20 +0200 Subject: [PATCH] fix(macos): Touch input broken (#3240) --- 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 83c668eb..6be72233 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