From 47d0022400ee2f6d0caebc2df26627855ef056a4 Mon Sep 17 00:00:00 2001 From: codeanticode Date: Tue, 5 Feb 2013 18:38:38 -0500 Subject: [PATCH] Fix for mouseButton not recording correctly: http://code.google.com/p/processing/issues/detail?id=1464 --- core/src/processing/opengl/PGL.java | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/core/src/processing/opengl/PGL.java b/core/src/processing/opengl/PGL.java index 04fd5097e..d630ba936 100644 --- a/core/src/processing/opengl/PGL.java +++ b/core/src/processing/opengl/PGL.java @@ -3251,6 +3251,13 @@ public class PGL { peButton = PConstants.RIGHT; } + if (PApplet.platform == PConstants.MACOSX) { + //if (nativeEvent.isPopupTrigger()) { + if ((modifiers & InputEvent.CTRL_MASK) != 0) { + peButton = PConstants.RIGHT; + } + } + float peAmount = peAction == MouseEvent.WHEEL ? nativeEvent.getWheelRotation() : nativeEvent.getClickCount();