From d942849f248c368b92ca73e145e8a5bc339112d7 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. --- 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 2a336996b..f965e9fe9 100644 --- a/hw/xquartz/X11Application.m +++ b/hw/xquartz/X11Application.m @@ -906,7 +906,7 @@ extern int darwin_modifier_flags; // darwinEvents.c tilt_y = [e tilt].y; } - if([e subtype] != NSTabletProximityEventSubtype) { + if([e subtype] == NSTabletProximityEventSubtype) { switch([e pointingDeviceType]) { case NSEraserPointingDevice: darwinTabletCurrent=darwinTabletEraser; @@ -931,21 +931,19 @@ extern int darwin_modifier_flags; // darwinEvents.c 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);