From 417b83ebd6c4147a290deeb88047bf64e2a27917 Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Fri, 16 Sep 2011 04:15:42 +0200 Subject: NewtCanvasAWT: Minor edits, prefer requestFocusInWindow() in requestFocusAWTParent() --- .../classes/com/jogamp/newt/awt/NewtCanvasAWT.java | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) (limited to 'src/newt/classes') diff --git a/src/newt/classes/com/jogamp/newt/awt/NewtCanvasAWT.java b/src/newt/classes/com/jogamp/newt/awt/NewtCanvasAWT.java index 51a43d86c..5a924149c 100644 --- a/src/newt/classes/com/jogamp/newt/awt/NewtCanvasAWT.java +++ b/src/newt/classes/com/jogamp/newt/awt/NewtCanvasAWT.java @@ -95,6 +95,11 @@ public class NewtCanvasAWT extends java.awt.Canvas implements WindowClosingProto } catch (Exception e) { throw new NativeWindowException(e); } + /** + // wait for AWT focus ! + for(long sleep = Window.TIMEOUT_NATIVEWINDOW; 0() { public Object run() { try { - Class clazz = getToolkit().getClass(); + Class clazz = getToolkit().getClass(); while (clazz != null && disableBackgroundEraseMethod == null) { try { disableBackgroundEraseMethod = -- cgit v1.2.3