From fe3990355c04e2a188d9b056b8ba63a4c402c04c Mon Sep 17 00:00:00 2001 From: Mark Slee Date: Tue, 22 Jan 2019 15:35:02 -0800 Subject: [PATCH] Fix bug with control-click for RIGHT on Mac OS, addresses #5765 When a control-click occurs, the macosxLeftButtonWithCtrlPressed flag was set, but was never being unset due to accidental comparison with the button variable instead of action variable. All future mouse operations reported as right-click on Mac OS. This fixes the comparison so that only the operations from a mouse press with the control button down are reported as RIGHT. The flag is cleared after mouse release. --- core/src/processing/core/PApplet.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/src/processing/core/PApplet.java b/core/src/processing/core/PApplet.java index 52d4f8068..712db3766 100644 --- a/core/src/processing/core/PApplet.java +++ b/core/src/processing/core/PApplet.java @@ -2697,7 +2697,7 @@ public class PApplet implements PConstants { event.getX(), event.getY(), button, event.getCount()); } - if (button == MouseEvent.RELEASE) { + if (action == MouseEvent.RELEASE) { macosxLeftButtonWithCtrlPressed = false; } }