aboutsummaryrefslogtreecommitdiffstats
path: root/src/newt
diff options
context:
space:
mode:
Diffstat (limited to 'src/newt')
-rw-r--r--src/newt/classes/jogamp/newt/WindowImpl.java10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/newt/classes/jogamp/newt/WindowImpl.java b/src/newt/classes/jogamp/newt/WindowImpl.java
index 29056ee04..a76cd5493 100644
--- a/src/newt/classes/jogamp/newt/WindowImpl.java
+++ b/src/newt/classes/jogamp/newt/WindowImpl.java
@@ -285,6 +285,7 @@ public abstract class WindowImpl implements Window, NEWTEventConsumer
if( null != parentWindow && ( autoPosition || 0>getX() || 0>getY() ) ) {
definePosition(0, 0);
}
+ boolean postParentlockFocus = false;
try {
if(validateParentWindowHandle()) {
if(screenReferenceAdded) {
@@ -306,9 +307,7 @@ public abstract class WindowImpl implements Window, NEWTEventConsumer
fullScreenAction.run();
}
}
- // harmonize focus behavior for all platforms: focus on creation
- requestFocusInt(isFullscreen() /* skipFocusAction */, true/* force */);
- ((DisplayImpl) screen.getDisplay()).dispatchMessagesNative(); // status up2date
+ postParentlockFocus = true;
}
}
}
@@ -317,6 +316,11 @@ public abstract class WindowImpl implements Window, NEWTEventConsumer
parentWindow.unlockSurface();
}
}
+ if(postParentlockFocus) {
+ // harmonize focus behavior for all platforms: focus on creation
+ requestFocusInt(isFullscreen() /* skipFocusAction */, true/* force */);
+ ((DisplayImpl) screen.getDisplay()).dispatchMessagesNative(); // status up2date
+ }
if(DEBUG_IMPLEMENTATION) {
System.err.println("Window.createNative() END ("+getThreadName()+", "+this+")");
}