XQuartz: Fixed proximity logic errors for tablets.

(cherry picked from commit d942849f248c368b92ca73e145e8a5bc339112d7)
This commit is contained in:
Jeremy Huddleston 2008-09-04 08:55:22 -07:00
parent c661c6ae7a
commit 1c70e53f25

View File

@ -924,7 +924,7 @@ static void send_nsevent(NSEvent *e) {
tilt_y = [e tilt].y; tilt_y = [e tilt].y;
} }
if([e subtype] != NSTabletProximityEventSubtype) { if([e subtype] == NSTabletProximityEventSubtype) {
switch([e pointingDeviceType]) { switch([e pointingDeviceType]) {
case NSEraserPointingDevice: case NSEraserPointingDevice:
darwinTabletCurrent=darwinTabletEraser; darwinTabletCurrent=darwinTabletEraser;
@ -949,21 +949,19 @@ static void send_nsevent(NSEvent *e) {
break; break;
case NSTabletProximity: case NSTabletProximity:
if([e subtype] != NSTabletProximityEventSubtype) { switch([e pointingDeviceType]) {
switch([e pointingDeviceType]) { case NSEraserPointingDevice:
case NSEraserPointingDevice: darwinTabletCurrent=darwinTabletEraser;
darwinTabletCurrent=darwinTabletEraser; break;
break; case NSPenPointingDevice:
case NSPenPointingDevice: darwinTabletCurrent=darwinTabletStylus;
darwinTabletCurrent=darwinTabletStylus; break;
break; case NSCursorPointingDevice:
case NSCursorPointingDevice: case NSUnknownPointingDevice:
case NSUnknownPointingDevice: default:
default: darwinTabletCurrent=darwinTabletCursor;
darwinTabletCurrent=darwinTabletCursor; break;
break; }
}
}
DarwinSendProximityEvents([e isEnteringProximity]?ProximityIn:ProximityOut, DarwinSendProximityEvents([e isEnteringProximity]?ProximityIn:ProximityOut,
pointer_x, pointer_y); pointer_x, pointer_y);