diff options
author | Sven Gothel <[email protected]> | 2011-12-18 17:09:08 +0100 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2011-12-18 17:09:08 +0100 |
commit | 927521af10162f2bf8c02b12cce75bd7de71dafe (patch) | |
tree | 062fbe74ca33e46ca3f7bced27f52674e3986601 | |
parent | 8fc2136686abeaeba42e2210ae09b509fde40cb5 (diff) |
Fix bug 531. Thx to Sebastien (finding) and Julien (fixing) it.
https://jogamp.org/bugzilla/show_bug.cgi?id=531
Sorry .. we normally don't add credits in these git logs,
maybe we should change that to encourage contributors!?
-rw-r--r-- | src/newt/classes/jogamp/newt/WindowImpl.java | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/newt/classes/jogamp/newt/WindowImpl.java b/src/newt/classes/jogamp/newt/WindowImpl.java index f0abd9625..a8e93d428 100644 --- a/src/newt/classes/jogamp/newt/WindowImpl.java +++ b/src/newt/classes/jogamp/newt/WindowImpl.java @@ -2038,7 +2038,7 @@ public abstract class WindowImpl implements Window, NEWTEventConsumer } public MouseListener[] getMouseListeners() { - return (MouseListener[]) mouseListeners.toArray(); + return mouseListeners.toArray(new MouseListener[mouseListeners.size()]); } protected void consumeMouseEvent(MouseEvent e) { @@ -2128,7 +2128,7 @@ public abstract class WindowImpl implements Window, NEWTEventConsumer } public KeyListener[] getKeyListeners() { - return (KeyListener[]) keyListeners.toArray(); + return keyListeners.toArray(new KeyListener[keyListeners.size()]); } private final boolean propagateKeyEvent(KeyEvent e, KeyListener l) { @@ -2216,7 +2216,7 @@ public abstract class WindowImpl implements Window, NEWTEventConsumer } public WindowListener[] getWindowListeners() { - return (WindowListener[]) windowListeners.toArray(); + return windowListeners.toArray(new WindowListener[windowListeners.size()]); } protected void consumeWindowEvent(WindowEvent e) { |