From fab1ce7a07467065842e75c9d5c60c6bc7e305e0 Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Tue, 28 Sep 2010 09:33:52 +0300 Subject: NEWT: Newt/AWT Rollback AWTParentWindowAdapter changes --- src/newt/classes/com/jogamp/newt/awt/NewtCanvasAWT.java | 5 ++--- .../com/jogamp/newt/event/awt/AWTParentWindowAdapter.java | 14 -------------- 2 files changed, 2 insertions(+), 17 deletions(-) (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 d378e8ed0..097a2c442 100644 --- a/src/newt/classes/com/jogamp/newt/awt/NewtCanvasAWT.java +++ b/src/newt/classes/com/jogamp/newt/awt/NewtCanvasAWT.java @@ -51,7 +51,7 @@ public class NewtCanvasAWT extends java.awt.Canvas { NativeWindow parent = null; Window newtChild = null; - AWTParentWindowAdapter awtAdapter = null; + AWTAdapter awtAdapter = null; /** * Instantiates a NewtCanvas without a NEWT child.
@@ -89,7 +89,6 @@ public class NewtCanvasAWT extends java.awt.Canvas { System.err.println("FocusActionImpl.run() "+Display.getThreadName()); } NewtCanvasAWT.this.requestFocusAWTParent(); - // awtAdapter.setForcePermanentFocusLossOneShot(); KeyboardFocusManager kfm = KeyboardFocusManager.getCurrentKeyboardFocusManager(); kfm.clearGlobalFocusOwner(); } @@ -127,7 +126,7 @@ public class NewtCanvasAWT extends java.awt.Canvas { awtAdapter=null; } if(attach && null!=newtChild) { - awtAdapter = (AWTParentWindowAdapter) new AWTParentWindowAdapter(newtChild).addTo(this); + awtAdapter = new AWTParentWindowAdapter(newtChild).addTo(this); } } diff --git a/src/newt/classes/com/jogamp/newt/event/awt/AWTParentWindowAdapter.java b/src/newt/classes/com/jogamp/newt/event/awt/AWTParentWindowAdapter.java index e86d365bc..ba5581def 100644 --- a/src/newt/classes/com/jogamp/newt/event/awt/AWTParentWindowAdapter.java +++ b/src/newt/classes/com/jogamp/newt/event/awt/AWTParentWindowAdapter.java @@ -52,12 +52,6 @@ public class AWTParentWindowAdapter return super.removeFrom(awtComponent); } - boolean forcePermanentFocusLossOneShot = false; - - public void setForcePermanentFocusLossOneShot() { - forcePermanentFocusLossOneShot = true; - } - public void focusGained(java.awt.event.FocusEvent e) { if(DEBUG_IMPLEMENTATION) { System.err.println("AWT: focusGained: "+ e); @@ -68,14 +62,6 @@ public class AWTParentWindowAdapter if(DEBUG_IMPLEMENTATION) { System.err.println("AWT: focusLost: "+ e); } - if(forcePermanentFocusLossOneShot) { - forcePermanentFocusLossOneShot = false; - if(DEBUG_IMPLEMENTATION) { - System.err.println("AWT: focusLost: - clearGlobalFocusOwner -"); - } - KeyboardFocusManager kfm = KeyboardFocusManager.getCurrentKeyboardFocusManager(); - kfm.clearGlobalFocusOwner(); - } } public void componentResized(java.awt.event.ComponentEvent e) { -- cgit v1.2.3