XQuartz: Workaround for initial pressure/tilt being sent as 0 with motion during the proximity event
(cherry picked from commit 9a91d770a6411dd876187e64a8bda1f0745169ae)
This commit is contained in:
parent
1657dfb843
commit
d3f597a986
|
@ -936,14 +936,7 @@ static void send_nsevent(NSEvent *e) {
|
||||||
|
|
||||||
handle_mouse:
|
handle_mouse:
|
||||||
pDev = darwinPointer;
|
pDev = darwinPointer;
|
||||||
if ([e type] == NSTabletPoint || [e subtype] == NSTabletPointEventSubtype) {
|
|
||||||
pressure = [e pressure];
|
|
||||||
tilt_x = [e tilt].x;
|
|
||||||
tilt_y = [e tilt].y;
|
|
||||||
|
|
||||||
pDev = darwinTabletCurrent;
|
|
||||||
}
|
|
||||||
|
|
||||||
if([e subtype] == NSTabletProximityEventSubtype) {
|
if([e subtype] == NSTabletProximityEventSubtype) {
|
||||||
switch([e pointingDeviceType]) {
|
switch([e pointingDeviceType]) {
|
||||||
case NSEraserPointingDevice:
|
case NSEraserPointingDevice:
|
||||||
|
@ -959,8 +952,25 @@ static void send_nsevent(NSEvent *e) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* NSTabletProximityEventSubtype doesn't encode pressure ant tilt
|
||||||
|
* So we just pretend the motion was caused by the mouse. Hopefully
|
||||||
|
* we'll have a better solution for this in the future (like maybe
|
||||||
|
* NSTabletProximityEventSubtype will come from NSTabletPoint
|
||||||
|
* rather than NSMouseMoved.
|
||||||
|
pressure = [e pressure];
|
||||||
|
tilt_x = [e tilt].x;
|
||||||
|
tilt_y = [e tilt].y;
|
||||||
|
pDev = darwinTabletCurrent;
|
||||||
|
*/
|
||||||
|
|
||||||
DarwinSendProximityEvents([e isEnteringProximity]?ProximityIn:ProximityOut,
|
DarwinSendProximityEvents([e isEnteringProximity]?ProximityIn:ProximityOut,
|
||||||
pointer_x, pointer_y);
|
pointer_x, pointer_y);
|
||||||
|
}
|
||||||
|
|
||||||
|
if ([e type] == NSTabletPoint || [e subtype] == NSTabletPointEventSubtype) {
|
||||||
|
pressure = [e pressure];
|
||||||
|
tilt_x = [e tilt].x;
|
||||||
|
tilt_y = [e tilt].y;
|
||||||
|
|
||||||
pDev = darwinTabletCurrent;
|
pDev = darwinTabletCurrent;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue