xquartz: fix inverted tablet pen Y tilt on macOS
On macOS, the y tilt behavior is inverted; an increase in the tilt
value corresponds to tilting the device away from the user.
see https://chromium-review.googlesource.com/c/chromium/src/+/2348544
see 0f128fd7c5/src/plugins/platforms/cocoa/qnsview_tablet.mm (L63)
Fixes #792
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1779>
This commit is contained in:
parent
da0de21b72
commit
3562298068
|
@ -1101,7 +1101,7 @@ handle_mouse:
|
||||||
else
|
else
|
||||||
DarwinSendTabletEvents(darwinTabletCurrent, ProximityOut, 0,
|
DarwinSendTabletEvents(darwinTabletCurrent, ProximityOut, 0,
|
||||||
location.x, location.y, pressure,
|
location.x, location.y, pressure,
|
||||||
tilt.x, tilt.y);
|
tilt.x, -tilt.y);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1115,7 +1115,7 @@ handle_mouse:
|
||||||
if (needsProximityIn) {
|
if (needsProximityIn) {
|
||||||
DarwinSendTabletEvents(darwinTabletCurrent, ProximityIn, 0,
|
DarwinSendTabletEvents(darwinTabletCurrent, ProximityIn, 0,
|
||||||
location.x, location.y, pressure,
|
location.x, location.y, pressure,
|
||||||
tilt.x, tilt.y);
|
tilt.x, -tilt.y);
|
||||||
|
|
||||||
needsProximityIn = NO;
|
needsProximityIn = NO;
|
||||||
}
|
}
|
||||||
|
@ -1157,7 +1157,7 @@ handle_mouse:
|
||||||
} else {
|
} else {
|
||||||
DarwinSendTabletEvents(pDev, ev_type, ev_button,
|
DarwinSendTabletEvents(pDev, ev_type, ev_button,
|
||||||
location.x, location.y, pressure,
|
location.x, location.y, pressure,
|
||||||
tilt.x, tilt.y);
|
tilt.x, -tilt.y);
|
||||||
}
|
}
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
@ -1184,7 +1184,7 @@ handle_mouse:
|
||||||
else
|
else
|
||||||
DarwinSendTabletEvents(darwinTabletCurrent, ProximityOut, 0,
|
DarwinSendTabletEvents(darwinTabletCurrent, ProximityOut, 0,
|
||||||
location.x, location.y, pressure,
|
location.x, location.y, pressure,
|
||||||
tilt.x, tilt.y);
|
tilt.x, -tilt.y);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case NSScrollWheel:
|
case NSScrollWheel:
|
||||||
|
|
Loading…
Reference in New Issue