summaryrefslogtreecommitdiffstats
path: root/src/nativewindow/classes
diff options
context:
space:
mode:
Diffstat (limited to 'src/nativewindow/classes')
-rw-r--r--src/nativewindow/classes/com/jogamp/nativewindow/awt/JAWTWindow.java22
1 files changed, 14 insertions, 8 deletions
diff --git a/src/nativewindow/classes/com/jogamp/nativewindow/awt/JAWTWindow.java b/src/nativewindow/classes/com/jogamp/nativewindow/awt/JAWTWindow.java
index 9a19a7f7a..3c660b41b 100644
--- a/src/nativewindow/classes/com/jogamp/nativewindow/awt/JAWTWindow.java
+++ b/src/nativewindow/classes/com/jogamp/nativewindow/awt/JAWTWindow.java
@@ -159,20 +159,21 @@ public abstract class JAWTWindow implements NativeWindow, OffscreenLayerSurface,
" ** THREAD "+getThreadName();
}
- public JAWTComponentListener() {
+ private JAWTComponentListener() {
if(DEBUG) {
- System.err.println(jawtStr()+".attach: "+toString());
+ System.err.println(jawtStr()+".attach @ Thread "+getThreadName()+": "+toString());
}
- component.addComponentListener(jawtComponentListener);
- component.addHierarchyListener(jawtComponentListener);
+ component.addComponentListener(this);
+ component.addHierarchyListener(this);
}
- public final void detach() {
+ private final void detach() {
if(DEBUG) {
- System.err.println(jawtStr()+".detach: "+toString());
+ System.err.println(jawtStr()+".detach @ Thread "+getThreadName()+": "+toString());
}
- component.removeComponentListener(jawtComponentListener);
- component.removeHierarchyListener(jawtComponentListener);
+ component.removeComponentListener(this);
+ component.removeHierarchyListener(this);
+ component.setVisible(localVisibility); // restore component's original local state
}
@Override
@@ -251,6 +252,11 @@ public abstract class JAWTWindow implements NativeWindow, OffscreenLayerSurface,
} else if(DEBUG) {
System.err.println(jawtStr()+".hierarchyChanged SHOWING_CHANGED (x): showing "+showing+" -> visible "+(showing && localVisibility)+", "+s(e));
}
+ } else if(DEBUG) {
+ final boolean displayable = changed.isDisplayable();
+ final boolean _visible = displayable && localVisibility;
+ final boolean showing = changed.isShowing();
+ System.err.println(jawtStr()+".hierarchyChanged OTHER: displayable "+displayable+", showing "+showing+" -> visible "+_visible+", "+s(e));
}
}
}