Skip to content

Commit

Permalink
NewtCanvasAWT: Remove useless block in else branch
Browse files Browse the repository at this point in the history
  • Loading branch information
sgothel committed Nov 18, 2013
1 parent 177d0da commit b5b5b0f
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions src/newt/classes/com/jogamp/newt/awt/NewtCanvasAWT.java
Original file line number Diff line number Diff line change
Expand Up @@ -213,13 +213,10 @@ public boolean run() {
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
Expand Down

0 comments on commit b5b5b0f

Please sign in to comment.