aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2010-06-17 14:37:39 +0200
committerSven Gothel <[email protected]>2010-06-17 14:37:39 +0200
commitce8c373576fe58fa5c71811fa376321e5379f71d (patch)
treeefb0ea7cc42046250c058443de0e764be4a57b60 /src
parent0d24458c68ac1bb92da21a1701633f8f32a267bb (diff)
Cleanup enqueueEvent and remove PaintEvent and it's Listener
Diffstat (limited to 'src')
-rwxr-xr-xsrc/newt/classes/com/jogamp/newt/Display.java4
-rwxr-xr-xsrc/newt/classes/com/jogamp/newt/Window.java116
-rw-r--r--src/newt/classes/com/jogamp/newt/awt/NewtCanvasAWT.java8
-rw-r--r--src/newt/classes/com/jogamp/newt/event/NEWTEvent.java6
-rwxr-xr-xsrc/newt/classes/com/jogamp/newt/event/PaintEvent.java76
-rwxr-xr-xsrc/newt/classes/com/jogamp/newt/event/PaintListener.java44
-rw-r--r--src/newt/classes/com/jogamp/newt/event/TraceWindowAdapter.java4
-rw-r--r--src/newt/classes/com/jogamp/newt/event/WindowAdapter.java2
-rw-r--r--src/newt/classes/com/jogamp/newt/event/WindowEvent.java4
-rw-r--r--src/newt/classes/com/jogamp/newt/event/WindowListener.java1
-rw-r--r--src/newt/classes/com/jogamp/newt/event/awt/AWTAdapter.java10
-rw-r--r--src/newt/classes/com/jogamp/newt/event/awt/AWTKeyAdapter.java6
-rw-r--r--src/newt/classes/com/jogamp/newt/event/awt/AWTMouseAdapter.java14
-rw-r--r--src/newt/classes/com/jogamp/newt/event/awt/AWTWindowAdapter.java8
-rw-r--r--src/newt/classes/com/jogamp/newt/opengl/GLWindow.java4
15 files changed, 57 insertions, 250 deletions
diff --git a/src/newt/classes/com/jogamp/newt/Display.java b/src/newt/classes/com/jogamp/newt/Display.java
index 193bb26dc..02c4733e7 100755
--- a/src/newt/classes/com/jogamp/newt/Display.java
+++ b/src/newt/classes/com/jogamp/newt/Display.java
@@ -353,10 +353,6 @@ public abstract class Display {
}
}
- public void enqueueEvent(NEWTEvent e) {
- enqueueEvent(false, e);
- }
-
public void enqueueEvent(boolean wait, NEWTEvent e) {
Object lock = new Object();
NEWTEventTask eTask = new NEWTEventTask(e, wait?lock:null);
diff --git a/src/newt/classes/com/jogamp/newt/Window.java b/src/newt/classes/com/jogamp/newt/Window.java
index e9289f5dc..9bd4bb377 100755
--- a/src/newt/classes/com/jogamp/newt/Window.java
+++ b/src/newt/classes/com/jogamp/newt/Window.java
@@ -607,7 +607,7 @@ public abstract class Window implements NativeWindow
System.err.println("Window.windowDestroyNotify START "+getThreadName());
}
- enqueueWindowEvent(WindowEvent.EVENT_WINDOW_DESTROY_NOTIFY);
+ enqueueWindowEvent(false, WindowEvent.EVENT_WINDOW_DESTROY_NOTIFY);
if(handleDestroyNotify && !isDestroyed()) {
destroy();
@@ -709,6 +709,7 @@ public abstract class Window implements NativeWindow
runOnEDTIfAvail(true, new ReparentAction(newParent, newScreen));
// if( isVisible() ) {
enqueueWindowEvent(true, WindowEvent.EVENT_WINDOW_RESIZED); // trigger a resize/relayout to listener
+ // enqueueWindowEvent(true, WindowEvent.EVENT_WINDOW_REPAINT); // trigger a repaint to listener
// }
}
}
@@ -957,15 +958,19 @@ public abstract class Window implements NativeWindow
// Generic Event Support
//
+ public void enqueueEvent(boolean wait, com.jogamp.newt.event.NEWTEvent event) {
+ if(!getInnerWindow().isDestroyed()) {
+ getInnerWindow().getScreen().getDisplay().enqueueEvent(wait, event);
+ }
+ }
+
public void sendEvent(NEWTEvent e) {
if(e instanceof WindowEvent) {
- sendWindowEvent((WindowEvent)e);
+ getInnerWindow().sendWindowEvent((WindowEvent)e);
} else if(e instanceof KeyEvent) {
- sendKeyEvent((KeyEvent)e);
+ getInnerWindow().sendKeyEvent((KeyEvent)e);
} else if(e instanceof MouseEvent) {
- sendMouseEvent((MouseEvent)e);
- } else if(e instanceof PaintEvent) {
- sendPaintEvent((PaintEvent)e);
+ getInnerWindow().sendMouseEvent((MouseEvent)e);
}
}
@@ -1061,7 +1066,7 @@ public abstract class Window implements NativeWindow
private int lastMouseClickCount = 0; // last mouse button click count
public static final int ClickTimeout = 300;
- protected void enqueueMouseEvent(int eventType, int modifiers,
+ public void enqueueMouseEvent(boolean wait, int eventType, int modifiers,
int x, int y, int button, int rotation) {
if(x<0||y<0||x>=width||y>=height) {
return; // .. invalid ..
@@ -1111,12 +1116,12 @@ public abstract class Window implements NativeWindow
} else {
e = new MouseEvent(eventType, this, when, modifiers, x, y, 0, button, 0);
}
- screen.getDisplay().enqueueEvent(e);
+ screen.getDisplay().enqueueEvent(wait, e);
if(null!=eClicked) {
if(DEBUG_MOUSE_EVENT) {
System.err.println("enqueueMouseEvent: synthesized MOUSE_CLICKED event");
}
- screen.getDisplay().enqueueEvent(eClicked);
+ screen.getDisplay().enqueueEvent(wait, eClicked);
}
}
@@ -1225,8 +1230,8 @@ public abstract class Window implements NativeWindow
// KeyListener/Event Support
//
- protected void enqueueKeyEvent(int eventType, int modifiers, int keyCode, char keyChar) {
- screen.getDisplay().enqueueEvent(
+ public void enqueueKeyEvent(boolean wait, int eventType, int modifiers, int keyCode, char keyChar) {
+ screen.getDisplay().enqueueEvent(wait,
new KeyEvent(eventType, this, System.currentTimeMillis(),
modifiers, keyCode, keyChar) );
}
@@ -1320,11 +1325,7 @@ public abstract class Window implements NativeWindow
//
// WindowListener/Event Support
//
- protected void enqueueWindowEvent(int eventType) {
- enqueueWindowEvent(false, eventType);
- }
-
- protected void enqueueWindowEvent(boolean wait, int eventType) {
+ public void enqueueWindowEvent(boolean wait, int eventType) {
WindowEvent event = new WindowEvent(eventType, this, System.currentTimeMillis());
screen.getDisplay().enqueueEvent( wait, event );
// sendWindowEvent ( event ); // FIXME: Think about performance/lag .. ?
@@ -1393,8 +1394,12 @@ public abstract class Window implements NativeWindow
}
protected void sendWindowEvent(WindowEvent e) {
+ getInnerWindow().sendWindowEvent(e, 0, 0, 0, 0);
+ }
+
+ protected void sendWindowEvent(WindowEvent e, int p1, int p2, int p3, int p4) {
if(DEBUG_WINDOW_EVENT) {
- System.err.println("sendWindowEvent: "+e);
+ System.err.println("sendWindowEvent: "+e+", "+p1+", "+p2+", "+p3+", "+p4);
}
ArrayList listeners = null;
synchronized(windowListeners) {
@@ -1418,6 +1423,9 @@ public abstract class Window implements NativeWindow
case WindowEvent.EVENT_WINDOW_LOST_FOCUS:
l.windowLostFocus(e);
break;
+ //case WindowEvent.EVENT_WINDOW_REPAINT:
+ // l.windowRepaint(e);
+ // break;
default:
throw
new NativeWindowException("Unexpected window event type "
@@ -1426,80 +1434,6 @@ public abstract class Window implements NativeWindow
}
}
-
- //
- // PaintListener/Event Support
- //
-
- private ArrayList paintListeners = new ArrayList();
-
- /**
- * Appends the given {@link com.jogamp.newt.event.PaintListener} to the end of
- * the list.
- */
- public void addPaintListener(PaintListener l) {
- getInnerWindow().addPaintListener(-1, l);
- }
-
- /**
- * Inserts the given {@link com.jogamp.newt.event.PaintListener} at the
- * specified position in the list.<br>
-
- * @param index Position where the listener will be inserted.
- * Should be within (0 <= index && index <= size()).
- * An index value of -1 is interpreted as the end of the list, size().
- * @param l The listener object to be inserted
- * @throws IndexOutOfBoundsException If the index is not within (0 <= index && index <= size()), or -1
- */
- public void addPaintListener(int index, PaintListener l) {
- if(l == null) {
- return;
- }
- synchronized(paintListeners) {
- if(0>index) {
- index = paintListeners.size();
- }
- ArrayList newPaintListeners = (ArrayList) paintListeners.clone();
- newPaintListeners.add(index, l);
- paintListeners = newPaintListeners;
- }
- }
-
- public void removePaintListener(PaintListener l) {
- if (l == null) {
- return;
- }
- synchronized(paintListeners) {
- ArrayList newPaintListeners = (ArrayList) paintListeners.clone();
- newPaintListeners.remove(l);
- paintListeners = newPaintListeners;
- }
- }
-
- public PaintListener getPaintListener(int index) {
- synchronized(paintListeners) {
- if(0>index) {
- index = paintListeners.size()-1;
- }
- return (PaintListener) paintListeners.get(index);
- }
- }
-
- protected void sendPaintEvent(int eventType, int x, int y, int w, int h) {
- sendPaintEvent( new PaintEvent(eventType, this, System.currentTimeMillis(), x, y, w, h) );
- }
-
- protected void sendPaintEvent(PaintEvent e) {
- ArrayList listeners = null;
- synchronized(paintListeners) {
- listeners = paintListeners;
- }
- for(Iterator i = listeners.iterator(); i.hasNext(); ) {
- PaintListener l = (PaintListener) i.next();
- l.exposed(e);
- }
- }
-
//
// Reflection helper ..
//
diff --git a/src/newt/classes/com/jogamp/newt/awt/NewtCanvasAWT.java b/src/newt/classes/com/jogamp/newt/awt/NewtCanvasAWT.java
index a84e571e4..8944c03bb 100644
--- a/src/newt/classes/com/jogamp/newt/awt/NewtCanvasAWT.java
+++ b/src/newt/classes/com/jogamp/newt/awt/NewtCanvasAWT.java
@@ -161,7 +161,13 @@ public class NewtCanvasAWT extends java.awt.Canvas {
newtChild.setVisible(false);
newtChild.reparentWindow(null, null);
}
- }
+ }
+
+ public void paint(Graphics g) {
+ if(null!=newtChild) {
+ // enqueueWindowEvent(true, WindowEvent.EVENT_WINDOW_REPAINT); // trigger a repaint to listener
+ }
+ }
// Disables the AWT's erasing of this Canvas's background on Windows
// in Java SE 6. This internal API is not available in previous
diff --git a/src/newt/classes/com/jogamp/newt/event/NEWTEvent.java b/src/newt/classes/com/jogamp/newt/event/NEWTEvent.java
index 2cb2c5177..476b3640e 100644
--- a/src/newt/classes/com/jogamp/newt/event/NEWTEvent.java
+++ b/src/newt/classes/com/jogamp/newt/event/NEWTEvent.java
@@ -57,9 +57,6 @@ public class NEWTEvent extends java.util.EventObject {
// 2: MouseEvent.java
// 3: com.jogamp.newt.Window
// 3: com.jogamp.newt.event.awt.AWTNewtEventFactory
- // 1: PaintEvent.java
- // 2: com.jogamp.newt.Window
- // 2: com.jogamp.newt.event.awt.AWTNewtEventFactory
// 1: WindowEvent.java
// 2: com.jogamp.newt.Window
// 2: com.jogamp.newt.event.awt.AWTNewtEventFactory
@@ -80,8 +77,7 @@ public class NEWTEvent extends java.util.EventObject {
String clazzName = null;
- if( (event instanceof com.jogamp.newt.event.WindowEvent) ||
- (event instanceof com.jogamp.newt.event.PaintEvent) ) {
+ if( event instanceof com.jogamp.newt.event.WindowEvent ) {
if ( stack.length > 2 ) {
clazzName = stack[2].getClassName();
}
diff --git a/src/newt/classes/com/jogamp/newt/event/PaintEvent.java b/src/newt/classes/com/jogamp/newt/event/PaintEvent.java
deleted file mode 100755
index e1c667b55..000000000
--- a/src/newt/classes/com/jogamp/newt/event/PaintEvent.java
+++ /dev/null
@@ -1,76 +0,0 @@
-/*
- * Copyright (c) 2009 Sun Microsystems, Inc. All Rights Reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- *
- * - Redistribution of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- *
- * - Redistribution in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * Neither the name of Sun Microsystems, Inc. or the names of
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- *
- * This software is provided "AS IS," without a warranty of any kind. ALL
- * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
- * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
- * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
- * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
- * ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
- * DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
- * ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
- * DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE
- * DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY,
- * ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF
- * SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
- *
- */
-
-package com.jogamp.newt.event;
-
-import com.jogamp.newt.*;
-
-/**
- *
- * @author tdv
- */
-public class PaintEvent extends NEWTEvent {
-
- // bounds of the damage region
- private int x, y, width, height;
- public PaintEvent(int eventType, Object source,
- long when, int x, int y, int w, int h)
- {
- super(eventType, source, when);
- this.x = x;
- this.y = y;
- this.width = w;
- this.height = h;
- }
-
- public int getHeight() {
- return height;
- }
-
- public int getWidth() {
- return width;
- }
-
- public int getX() {
- return x;
- }
-
- public int getY() {
- return y;
- }
-
- public String toString() {
- return "ExposeEvent[modifiers: x="+x+" y="+y+" w="+width+" h="+height +"]";
- }
-
-}
diff --git a/src/newt/classes/com/jogamp/newt/event/PaintListener.java b/src/newt/classes/com/jogamp/newt/event/PaintListener.java
deleted file mode 100755
index f64ae0069..000000000
--- a/src/newt/classes/com/jogamp/newt/event/PaintListener.java
+++ /dev/null
@@ -1,44 +0,0 @@
-/*
- * Copyright (c) 2009 Sun Microsystems, Inc. All Rights Reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- *
- * - Redistribution of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- *
- * - Redistribution in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * Neither the name of Sun Microsystems, Inc. or the names of
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- *
- * This software is provided "AS IS," without a warranty of any kind. ALL
- * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
- * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
- * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
- * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
- * ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
- * DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
- * ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
- * DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE
- * DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY,
- * ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF
- * SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
- *
- */
-
-package com.jogamp.newt.event;
-
-import com.jogamp.newt.*;
-
-/**
- *
- * @author tdv
- */
-public interface PaintListener {
- public void exposed(PaintEvent e);
-}
diff --git a/src/newt/classes/com/jogamp/newt/event/TraceWindowAdapter.java b/src/newt/classes/com/jogamp/newt/event/TraceWindowAdapter.java
index 5a93bca36..a6cf0d6ed 100644
--- a/src/newt/classes/com/jogamp/newt/event/TraceWindowAdapter.java
+++ b/src/newt/classes/com/jogamp/newt/event/TraceWindowAdapter.java
@@ -65,4 +65,8 @@ public class TraceWindowAdapter implements WindowListener {
System.out.println(e);
if(null!=downstream) { downstream.windowLostFocus(e); }
}
+ public void windowRepaint(WindowEvent e) {
+ System.out.println(e);
+ if(null!=downstream) { downstream.windowRepaint(e); }
+ }
}
diff --git a/src/newt/classes/com/jogamp/newt/event/WindowAdapter.java b/src/newt/classes/com/jogamp/newt/event/WindowAdapter.java
index 51732789e..925bc7113 100644
--- a/src/newt/classes/com/jogamp/newt/event/WindowAdapter.java
+++ b/src/newt/classes/com/jogamp/newt/event/WindowAdapter.java
@@ -45,4 +45,6 @@ public abstract class WindowAdapter implements WindowListener
}
public void windowLostFocus(WindowEvent e) {
}
+ public void windowRepaint(WindowEvent e) {
+ }
}
diff --git a/src/newt/classes/com/jogamp/newt/event/WindowEvent.java b/src/newt/classes/com/jogamp/newt/event/WindowEvent.java
index e542c467f..5221b3664 100644
--- a/src/newt/classes/com/jogamp/newt/event/WindowEvent.java
+++ b/src/newt/classes/com/jogamp/newt/event/WindowEvent.java
@@ -46,7 +46,7 @@ public class WindowEvent extends NEWTEvent {
public static final int EVENT_WINDOW_DESTROY_NOTIFY = 102;
public static final int EVENT_WINDOW_GAINED_FOCUS = 103;
public static final int EVENT_WINDOW_LOST_FOCUS = 104;
- // public static final int EVENT_WINDOW_REPAINT = 105; // TODO
+ public static final int EVENT_WINDOW_REPAINT = 105;
public WindowEvent(int eventType, Object source, long when) {
super(eventType, source, when);
@@ -59,7 +59,7 @@ public class WindowEvent extends NEWTEvent {
case EVENT_WINDOW_DESTROY_NOTIFY: return "EVENT_WINDOW_DESTROY_NOTIFY";
case EVENT_WINDOW_GAINED_FOCUS: return "EVENT_WINDOW_GAINED_FOCUS";
case EVENT_WINDOW_LOST_FOCUS: return "EVENT_WINDOW_LOST_FOCUS";
- // case EVENT_WINDOW_REPAINT: return "EVENT_WINDOW_REPAINT";
+ case EVENT_WINDOW_REPAINT: return "EVENT_WINDOW_REPAINT";
default: return "unknown (" + type + ")";
}
}
diff --git a/src/newt/classes/com/jogamp/newt/event/WindowListener.java b/src/newt/classes/com/jogamp/newt/event/WindowListener.java
index 871f0fe12..1a10131f7 100644
--- a/src/newt/classes/com/jogamp/newt/event/WindowListener.java
+++ b/src/newt/classes/com/jogamp/newt/event/WindowListener.java
@@ -41,4 +41,5 @@ public interface WindowListener extends NEWTEventListener {
public void windowDestroyNotify(WindowEvent e);
public void windowGainedFocus(WindowEvent e);
public void windowLostFocus(WindowEvent e);
+ public void windowRepaint(WindowUpdateEvent e);
}
diff --git a/src/newt/classes/com/jogamp/newt/event/awt/AWTAdapter.java b/src/newt/classes/com/jogamp/newt/event/awt/AWTAdapter.java
index e8497a741..b9d1f8678 100644
--- a/src/newt/classes/com/jogamp/newt/event/awt/AWTAdapter.java
+++ b/src/newt/classes/com/jogamp/newt/event/awt/AWTAdapter.java
@@ -165,16 +165,8 @@ public abstract class AWTAdapter implements java.util.EventListener
/** @see #addTo(java.awt.Component) */
public abstract AWTAdapter removeFrom(java.awt.Component awtComponent);
- void enqueueEvent(com.jogamp.newt.event.NEWTEvent event) {
- enqueueEvent(false, event);
- }
-
void enqueueEvent(boolean wait, com.jogamp.newt.event.NEWTEvent event) {
- try {
- newtWindow.getScreen().getDisplay().enqueueEvent(wait, event);
- } catch (NullPointerException npe) {
- /* that's ok .. window might be down already */
- }
+ newtWindow.enqueueEvent(wait, event);
}
}
diff --git a/src/newt/classes/com/jogamp/newt/event/awt/AWTKeyAdapter.java b/src/newt/classes/com/jogamp/newt/event/awt/AWTKeyAdapter.java
index d2b733f98..7e3e5f1b1 100644
--- a/src/newt/classes/com/jogamp/newt/event/awt/AWTKeyAdapter.java
+++ b/src/newt/classes/com/jogamp/newt/event/awt/AWTKeyAdapter.java
@@ -60,7 +60,7 @@ public class AWTKeyAdapter extends AWTAdapter implements java.awt.event.KeyListe
if(null!=newtListener) {
((com.jogamp.newt.event.KeyListener)newtListener).keyPressed(event);
} else {
- enqueueEvent(event);
+ enqueueEvent(false, event);
}
}
@@ -69,7 +69,7 @@ public class AWTKeyAdapter extends AWTAdapter implements java.awt.event.KeyListe
if(null!=newtListener) {
((com.jogamp.newt.event.KeyListener)newtListener).keyReleased(event);
} else {
- enqueueEvent(event);
+ enqueueEvent(false, event);
}
}
@@ -78,7 +78,7 @@ public class AWTKeyAdapter extends AWTAdapter implements java.awt.event.KeyListe
if(null!=newtListener) {
((com.jogamp.newt.event.KeyListener)newtListener).keyTyped(event);
} else {
- enqueueEvent(event);
+ enqueueEvent(false, event);
}
}
}
diff --git a/src/newt/classes/com/jogamp/newt/event/awt/AWTMouseAdapter.java b/src/newt/classes/com/jogamp/newt/event/awt/AWTMouseAdapter.java
index 058a5f250..3f774f193 100644
--- a/src/newt/classes/com/jogamp/newt/event/awt/AWTMouseAdapter.java
+++ b/src/newt/classes/com/jogamp/newt/event/awt/AWTMouseAdapter.java
@@ -62,7 +62,7 @@ public class AWTMouseAdapter extends AWTAdapter implements java.awt.event.MouseL
if(null!=newtListener) {
((com.jogamp.newt.event.MouseListener)newtListener).mouseClicked(event);
} else {
- enqueueEvent(event);
+ enqueueEvent(false, event);
}
}
@@ -71,7 +71,7 @@ public class AWTMouseAdapter extends AWTAdapter implements java.awt.event.MouseL
if(null!=newtListener) {
((com.jogamp.newt.event.MouseListener)newtListener).mouseEntered(event);
} else {
- enqueueEvent(event);
+ enqueueEvent(false, event);
}
}
@@ -80,7 +80,7 @@ public class AWTMouseAdapter extends AWTAdapter implements java.awt.event.MouseL
if(null!=newtListener) {
((com.jogamp.newt.event.MouseListener)newtListener).mouseExited(event);
} else {
- enqueueEvent(event);
+ enqueueEvent(false, event);
}
}
@@ -89,7 +89,7 @@ public class AWTMouseAdapter extends AWTAdapter implements java.awt.event.MouseL
if(null!=newtListener) {
((com.jogamp.newt.event.MouseListener)newtListener).mousePressed(event);
} else {
- enqueueEvent(event);
+ enqueueEvent(false, event);
}
}
@@ -98,7 +98,7 @@ public class AWTMouseAdapter extends AWTAdapter implements java.awt.event.MouseL
if(null!=newtListener) {
((com.jogamp.newt.event.MouseListener)newtListener).mouseReleased(event);
} else {
- enqueueEvent(event);
+ enqueueEvent(false, event);
}
}
@@ -107,7 +107,7 @@ public class AWTMouseAdapter extends AWTAdapter implements java.awt.event.MouseL
if(null!=newtListener) {
((com.jogamp.newt.event.MouseListener)newtListener).mouseDragged(event);
} else {
- enqueueEvent(event);
+ enqueueEvent(false, event);
}
}
@@ -116,7 +116,7 @@ public class AWTMouseAdapter extends AWTAdapter implements java.awt.event.MouseL
if(null!=newtListener) {
((com.jogamp.newt.event.MouseListener)newtListener).mouseMoved(event);
} else {
- enqueueEvent(event);
+ enqueueEvent(false, event);
}
}
}
diff --git a/src/newt/classes/com/jogamp/newt/event/awt/AWTWindowAdapter.java b/src/newt/classes/com/jogamp/newt/event/awt/AWTWindowAdapter.java
index ee7ca97ad..7bfffbafc 100644
--- a/src/newt/classes/com/jogamp/newt/event/awt/AWTWindowAdapter.java
+++ b/src/newt/classes/com/jogamp/newt/event/awt/AWTWindowAdapter.java
@@ -91,7 +91,7 @@ public class AWTWindowAdapter
if(null!=newtListener) {
((com.jogamp.newt.event.WindowListener)newtListener).windowResized(event);
} else {
- enqueueEvent(event);
+ enqueueEvent(false, event);
}
}
@@ -100,7 +100,7 @@ public class AWTWindowAdapter
if(null!=newtListener) {
((com.jogamp.newt.event.WindowListener)newtListener).windowMoved(event);
} else {
- enqueueEvent(event);
+ enqueueEvent(false, event);
}
}
@@ -143,7 +143,7 @@ public class AWTWindowAdapter
if(null!=newtListener) {
((com.jogamp.newt.event.WindowListener)newtListener).windowGainedFocus(event);
} else {
- enqueueEvent(event);
+ enqueueEvent(false, event);
}
}
@@ -156,7 +156,7 @@ public class AWTWindowAdapter
if(null!=newtListener) {
((com.jogamp.newt.event.WindowListener)newtListener).windowLostFocus(event);
} else {
- enqueueEvent(event);
+ enqueueEvent(false, event);
}
}
diff --git a/src/newt/classes/com/jogamp/newt/opengl/GLWindow.java b/src/newt/classes/com/jogamp/newt/opengl/GLWindow.java
index 0e93fc0bd..e36e516df 100644
--- a/src/newt/classes/com/jogamp/newt/opengl/GLWindow.java
+++ b/src/newt/classes/com/jogamp/newt/opengl/GLWindow.java
@@ -369,10 +369,6 @@ public class GLWindow extends Window implements GLAutoDrawable {
return window.isFullscreen();
}
- public void sendEvent(NEWTEvent e) {
- window.sendEvent(e);
- }
-
public void addSurfaceUpdatedListener(int index, SurfaceUpdatedListener l) {
window.addSurfaceUpdatedListener(index, l);
}