From 26961cfb96c0ad95965f48ae6b5e909958d4d97c Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Sat, 2 Oct 2010 18:48:12 +0300 Subject: Increased junit timout to 30 min. Move ClickTimeout to MouseEvent (public) --- src/newt/classes/com/jogamp/newt/event/MouseEvent.java | 4 ++++ src/newt/classes/com/jogamp/newt/impl/WindowImpl.java | 5 ++--- 2 files changed, 6 insertions(+), 3 deletions(-) (limited to 'src') 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