macos: Fix inverted pen Y tilt on macOS

- Negate tilt.y in Cocoa pen handling to correct inverted Y tilt axis
- see 0f128fd7c5/src/plugins/platforms/cocoa/qnsview_tablet.mm (L63)
- see https://source.chromium.org/chromium/chromium/src/+/main:components/input/web_input_event_builders_mac.mm;drc=0af5ffa1e4cc4cc4f818725f8fee93ec57855e4b;l=421
This commit is contained in:
Aki 2025-01-31 10:59:06 +08:00
parent 0ec10c6169
commit 40072ff1ab
No known key found for this signature in database
GPG Key ID: 71EB4ADB554E1DCC

View File

@ -1088,7 +1088,7 @@ fill_button_event (GdkWindow *window,
axes[1] = y; axes[1] = y;
axes[2] = [nsevent pressure]; axes[2] = [nsevent pressure];
axes[3] = [nsevent tilt].x; axes[3] = [nsevent tilt].x;
axes[4] = [nsevent tilt].y; axes[4] = -[nsevent tilt].y;
} }
event->any.type = type; event->any.type = type;
@ -1131,7 +1131,7 @@ fill_motion_event (GdkWindow *window,
axes[1] = y; axes[1] = y;
axes[2] = [nsevent pressure]; axes[2] = [nsevent pressure];
axes[3] = [nsevent tilt].x; axes[3] = [nsevent tilt].x;
axes[4] = [nsevent tilt].y; axes[4] = -[nsevent tilt].y;
} }
event->any.type = GDK_MOTION_NOTIFY; event->any.type = GDK_MOTION_NOTIFY;