From 4efc9344af1c4aa7d00c7b40e5caf063efdf6080 Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Fri, 27 Apr 2012 01:19:51 +0200 Subject: Fix Bug 571: X11 behavior, where the PRESSED button is not included in the native mask. --- src/newt/classes/jogamp/newt/WindowImpl.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/newt/classes/jogamp/newt/WindowImpl.java b/src/newt/classes/jogamp/newt/WindowImpl.java index f82f4b7d4..6b3fd7aa4 100644 --- a/src/newt/classes/jogamp/newt/WindowImpl.java +++ b/src/newt/classes/jogamp/newt/WindowImpl.java @@ -2030,9 +2030,12 @@ public abstract class WindowImpl implements Window, NEWTEventConsumer lastMousePosition.setX(x); lastMousePosition.setY(y); } - if(button<0||button>MouseEvent.BUTTON_NUMBER) { + if( 0 > button || button > MouseEvent.BUTTON_NUMBER ) { throw new NativeWindowException("Invalid mouse button number" + button); } + // Fixes Bug 571: X11 behavior, where the PRESSED button is not included in the native mask. + modifiers |= InputEvent.getButtonMask(button); + MouseEvent eClicked = null; MouseEvent e = null; -- cgit v1.2.3