aboutsummaryrefslogtreecommitdiffstats
path: root/src/newt
diff options
context:
space:
mode:
Diffstat (limited to 'src/newt')
-rw-r--r--src/newt/classes/com/jogamp/newt/event/MouseEvent.java4
-rw-r--r--src/newt/classes/com/jogamp/newt/impl/WindowImpl.java5
2 files changed, 6 insertions, 3 deletions
diff --git a/src/newt/classes/com/jogamp/newt/event/MouseEvent.java b/src/newt/classes/com/jogamp/newt/event/MouseEvent.java
index 662b81c9e..705f558b9 100644
--- a/src/newt/classes/com/jogamp/newt/event/MouseEvent.java
+++ b/src/newt/classes/com/jogamp/newt/event/MouseEvent.java
@@ -45,6 +45,10 @@ public class MouseEvent extends InputEvent
public static final int BUTTON6 = 6;
public static final int BUTTON_NUMBER = 6;
+ public static final int getClickTimeout() {
+ return 300;
+ }
+
public MouseEvent(int eventType, Object source, long when,
int modifiers, int x, int y, int clickCount, int button,
int rotation)
diff --git a/src/newt/classes/com/jogamp/newt/impl/WindowImpl.java b/src/newt/classes/com/jogamp/newt/impl/WindowImpl.java
index a1aea694c..c10d9a491 100644
--- a/src/newt/classes/com/jogamp/newt/impl/WindowImpl.java
+++ b/src/newt/classes/com/jogamp/newt/impl/WindowImpl.java
@@ -1313,7 +1313,6 @@ public abstract class WindowImpl implements Window, NEWTEventConsumer
private int mouseButtonPressed = 0; // current pressed mouse button number
private long lastMousePressed = 0; // last time when a mouse button was pressed
private int lastMouseClickCount = 0; // last mouse button click count
- public static final int ClickTimeout = 300;
public void sendMouseEvent(int eventType, int modifiers,
int x, int y, int button, int rotation) {
@@ -1340,7 +1339,7 @@ public abstract class WindowImpl implements Window, NEWTEventConsumer
MouseEvent e = null;
if(MouseEvent.EVENT_MOUSE_PRESSED==eventType) {
- if(when-lastMousePressed<ClickTimeout) {
+ if(when-lastMousePressed<MouseEvent.getClickTimeout()) {
lastMouseClickCount++;
} else {
lastMouseClickCount=1;
@@ -1352,7 +1351,7 @@ public abstract class WindowImpl implements Window, NEWTEventConsumer
} else if(MouseEvent.EVENT_MOUSE_RELEASED==eventType) {
e = new MouseEvent(eventType, this, when,
modifiers, x, y, lastMouseClickCount, button, 0);
- if(when-lastMousePressed<ClickTimeout) {
+ if(when-lastMousePressed<MouseEvent.getClickTimeout()) {
eClicked = new MouseEvent(MouseEvent.EVENT_MOUSE_CLICKED, this, when,
modifiers, x, y, lastMouseClickCount, button, 0);
} else {