aboutsummaryrefslogtreecommitdiffstats
path: root/src/newt
diff options
context:
space:
mode:
Diffstat (limited to 'src/newt')
-rw-r--r--src/newt/classes/com/jogamp/newt/awt/NewtCanvasAWT.java3
-rw-r--r--src/newt/classes/com/jogamp/newt/impl/WindowImpl.java2
2 files changed, 2 insertions, 3 deletions
diff --git a/src/newt/classes/com/jogamp/newt/awt/NewtCanvasAWT.java b/src/newt/classes/com/jogamp/newt/awt/NewtCanvasAWT.java
index 097a2c442..01593b2d9 100644
--- a/src/newt/classes/com/jogamp/newt/awt/NewtCanvasAWT.java
+++ b/src/newt/classes/com/jogamp/newt/awt/NewtCanvasAWT.java
@@ -101,7 +101,6 @@ public class NewtCanvasAWT extends java.awt.Canvas {
public NewtCanvasAWT setNEWTChild(Window child) {
if(newtChild!=child) {
newtChild = child;
- newtChild.setFocusAction(focusAction);
if(null!=parent) {
java.awt.Container cont = getContainer(this);
// reparent right away, addNotify has been called already
@@ -167,6 +166,7 @@ public class NewtCanvasAWT extends java.awt.Canvas {
return; // nop
}
+ newtChild.setFocusAction(null); // no AWT focus traversal ..
if(add) {
parent = NewtFactoryAWT.getNativeWindow(this, newtChild.getRequestedCapabilities());
if(null!=parent) {
@@ -180,6 +180,7 @@ public class NewtCanvasAWT extends java.awt.Canvas {
setWindowAdapter(true);
newtChild.sendWindowEvent(WindowEvent.EVENT_WINDOW_RESIZED); // trigger a resize/relayout to listener
newtChild.windowRepaint(0, 0, newtChild.getWidth(), newtChild.getHeight());
+ newtChild.setFocusAction(focusAction); // enable AWT focus traversal
}
} else {
setWindowAdapter(false);
diff --git a/src/newt/classes/com/jogamp/newt/impl/WindowImpl.java b/src/newt/classes/com/jogamp/newt/impl/WindowImpl.java
index 9d5d12966..a1aea694c 100644
--- a/src/newt/classes/com/jogamp/newt/impl/WindowImpl.java
+++ b/src/newt/classes/com/jogamp/newt/impl/WindowImpl.java
@@ -811,7 +811,6 @@ public abstract class WindowImpl implements Window, NEWTEventConsumer
if(wasVisible) {
visible = true;
setVisibleImpl(true);
- requestFocusImpl(true);
display.dispatchMessages(); // status up2date
}
} else {
@@ -848,7 +847,6 @@ public abstract class WindowImpl implements Window, NEWTEventConsumer
System.err.println("Window.reparentWindow: ReparentActionRecreate ("+getThreadName()+") windowHandle "+toHexString(windowHandle)+", visible: "+visible+", parentWindowHandle "+toHexString(parentWindowHandle)+", parentWindow "+Display.hashCode(parentWindow));
}
setVisible(true); // native creation
- requestFocus();
} finally {
windowLock.unlock();
}