aboutsummaryrefslogtreecommitdiffstats
path: root/src/newt
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2010-11-28 03:31:30 +0100
committerSven Gothel <[email protected]>2010-11-28 03:31:30 +0100
commitaaa2b1df6ba9bd30f251ddada32ba0d56b12aa81 (patch)
tree304fae25ce509edfdb3b96e2a57bd5d9def5dadf /src/newt
parent6e8bf2d5caffe8734075fb84736d19a6e45e6e83 (diff)
NewtCanvasAWT: disableBackgroundErase() before (X11) and after (Windows) addNotify().
This change is in sync with 86c164950b0a0d351fc8af3884187b10201b6237
Diffstat (limited to 'src/newt')
-rw-r--r--src/newt/classes/com/jogamp/newt/awt/NewtCanvasAWT.java17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/newt/classes/com/jogamp/newt/awt/NewtCanvasAWT.java b/src/newt/classes/com/jogamp/newt/awt/NewtCanvasAWT.java
index a0ab5f9f6..bee81624a 100644
--- a/src/newt/classes/com/jogamp/newt/awt/NewtCanvasAWT.java
+++ b/src/newt/classes/com/jogamp/newt/awt/NewtCanvasAWT.java
@@ -140,8 +140,16 @@ public class NewtCanvasAWT extends java.awt.Canvas {
}
public void addNotify() {
+
+ // before native peer is valid: X11
+ disableBackgroundErase();
+
+ // creates the native peer
super.addNotify();
+
+ // after native peer is valid: Windows
disableBackgroundErase();
+
java.awt.Container cont = getContainer(this);
if(DEBUG) {
// if ( isShowing() == false ) -> Container was not visible yet.
@@ -304,13 +312,22 @@ public class NewtCanvasAWT extends java.awt.Canvas {
} catch (Exception e) {
}
disableBackgroundEraseInitialized = true;
+ if(DEBUG) {
+ System.err.println("NewtCanvasAWT: TK disableBackgroundErase method found: "+
+ (null!=disableBackgroundEraseMethod));
+ }
}
if (disableBackgroundEraseMethod != null) {
+ Throwable t=null;
try {
disableBackgroundEraseMethod.invoke(getToolkit(), new Object[] { this });
} catch (Exception e) {
// FIXME: workaround for 6504460 (incorrect backport of 6333613 in 5.0u10)
// throw new GLException(e);
+ t = e;
+ }
+ if(DEBUG) {
+ System.err.println("NewtCanvasAWT: TK disableBackgroundErase error: "+t);
}
}
}