aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/newt/classes/com/jogamp/newt/awt/NewtCanvasAWT.java9
1 files changed, 3 insertions, 6 deletions
diff --git a/src/newt/classes/com/jogamp/newt/awt/NewtCanvasAWT.java b/src/newt/classes/com/jogamp/newt/awt/NewtCanvasAWT.java
index fd8d44a74..749002b0f 100644
--- a/src/newt/classes/com/jogamp/newt/awt/NewtCanvasAWT.java
+++ b/src/newt/classes/com/jogamp/newt/awt/NewtCanvasAWT.java
@@ -213,13 +213,10 @@ public class NewtCanvasAWT extends java.awt.Canvas implements WindowClosingProto
if( isOnscreen ) {
// Remove the AWT focus in favor of the native NEWT focus
AWTEDTExecutor.singleton.invoke(false, awtClearGlobalFocusOwner);
- }
- else {
+ } else if( !hasFocus() ) {
// In offscreen mode we require the focus!
- if( !hasFocus() ) {
- // Newt-EDT -> AWT-EDT may freeze Window's native peer requestFocus.
- NewtCanvasAWT.super.requestFocus();
- }
+ // Newt-EDT -> AWT-EDT may freeze Window's native peer requestFocus.
+ NewtCanvasAWT.super.requestFocus();
}
}
return false; // NEWT shall proceed requesting the native focus