aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2013-11-18 22:15:53 +0100
committerSven Gothel <[email protected]>2013-11-18 22:15:53 +0100
commitb5b5b0f9f5a12e131b4718af8a4cea899f74e1dc (patch)
tree6b67a06d4e1e155b7f13072ddcfe7b83ba680c48
parent177d0da1a9a8e031f15efa9e89465f8ed97f25e5 (diff)
NewtCanvasAWT: Remove useless block in else branch
-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