From 0a9d16f057727652220a5983b65f22f427df6a22 Mon Sep 17 00:00:00 2001 From: Harvey Harrison Date: Mon, 18 Nov 2013 10:55:30 -0800 Subject: jogl: simplify conditional that repeats test for isOnScreen if (isOnscreen) else if (!isOnScreen) change to if (isOnscreen) else Signed-off-by: Harvey Harrison --- src/newt/classes/com/jogamp/newt/awt/NewtCanvasAWT.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/newt/classes/com') diff --git a/src/newt/classes/com/jogamp/newt/awt/NewtCanvasAWT.java b/src/newt/classes/com/jogamp/newt/awt/NewtCanvasAWT.java index 35f4fca73..e5c76f25d 100644 --- a/src/newt/classes/com/jogamp/newt/awt/NewtCanvasAWT.java +++ b/src/newt/classes/com/jogamp/newt/awt/NewtCanvasAWT.java @@ -213,7 +213,8 @@ public class NewtCanvasAWT extends java.awt.Canvas implements WindowClosingProto if( isOnscreen ) { // Remove the AWT focus in favor of the native NEWT focus KeyboardFocusManager.getCurrentKeyboardFocusManager().clearGlobalFocusOwner(); - } else if( !isOnscreen ) { + } + else { // In offscreen mode we require the focus! if( !hasFocus() ) { // Newt-EDT -> AWT-EDT may freeze Window's native peer requestFocus. -- cgit v1.2.3