From 1c70e53f2560cb877c8b149034f296232de67a4e Mon Sep 17 00:00:00 2001 From: Jeremy Huddleston Date: Thu, 4 Sep 2008 08:55:22 -0700 Subject: [PATCH] XQuartz: Fixed proximity logic errors for tablets. (cherry picked from commit d942849f248c368b92ca73e145e8a5bc339112d7) --- hw/xquartz/X11Application.m | 30 ++++++++++++++---------------- 1 file changed, 14 insertions(+), 16 deletions(-) diff --git a/hw/xquartz/X11Application.m b/hw/xquartz/X11Application.m index 3bc489974..4ac977a7d 100644 --- a/hw/xquartz/X11Application.m +++ b/hw/xquartz/X11Application.m @@ -924,7 +924,7 @@ static void send_nsevent(NSEvent *e) { tilt_y = [e tilt].y; } - if([e subtype] != NSTabletProximityEventSubtype) { + if([e subtype] == NSTabletProximityEventSubtype) { switch([e pointingDeviceType]) { case NSEraserPointingDevice: darwinTabletCurrent=darwinTabletEraser; @@ -949,21 +949,19 @@ static void send_nsevent(NSEvent *e) { break; case NSTabletProximity: - if([e subtype] != NSTabletProximityEventSubtype) { - switch([e pointingDeviceType]) { - case NSEraserPointingDevice: - darwinTabletCurrent=darwinTabletEraser; - break; - case NSPenPointingDevice: - darwinTabletCurrent=darwinTabletStylus; - break; - case NSCursorPointingDevice: - case NSUnknownPointingDevice: - default: - darwinTabletCurrent=darwinTabletCursor; - break; - } - } + switch([e pointingDeviceType]) { + case NSEraserPointingDevice: + darwinTabletCurrent=darwinTabletEraser; + break; + case NSPenPointingDevice: + darwinTabletCurrent=darwinTabletStylus; + break; + case NSCursorPointingDevice: + case NSUnknownPointingDevice: + default: + darwinTabletCurrent=darwinTabletCursor; + break; + } DarwinSendProximityEvents([e isEnteringProximity]?ProximityIn:ProximityOut, pointer_x, pointer_y);