aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2014-02-25 16:53:10 +0100
committerSven Gothel <[email protected]>2014-02-25 16:53:10 +0100
commit083e430a76586347e87f4e2a25d92ac00cdcc61a (patch)
tree216a324df21356981c3ae6fc1706d5c8bafbb3a3 /src
parentc67de337a8aaf52e36104c3f13e273aa19d21f1f (diff)
Bug 937 : Fix regression of commit 071bdd6ce9f8c41ccecdbf8bc74f276ccd7ff651 (which disables print if !isShowing())
Commit 071bdd6ce9f8c41ccecdbf8bc74f276ccd7ff651 uses 'isShowing' state to determine whether to display or not. It also uses 'isShowing' instead of 'isVisible' for printing, which is a regression, since not showing elements offscreen shall be able to be printed.
Diffstat (limited to 'src')
-rw-r--r--src/jogl/classes/javax/media/opengl/awt/GLCanvas.java4
-rw-r--r--src/jogl/classes/javax/media/opengl/awt/GLJPanel.java6
-rw-r--r--src/newt/classes/com/jogamp/newt/awt/NewtCanvasAWT.java4
3 files changed, 7 insertions, 7 deletions
diff --git a/src/jogl/classes/javax/media/opengl/awt/GLCanvas.java b/src/jogl/classes/javax/media/opengl/awt/GLCanvas.java
index abf670c95..09589080f 100644
--- a/src/jogl/classes/javax/media/opengl/awt/GLCanvas.java
+++ b/src/jogl/classes/javax/media/opengl/awt/GLCanvas.java
@@ -818,9 +818,9 @@ public class GLCanvas extends Canvas implements AWTGLAutoDrawable, WindowClosing
printActive = false;
return; // not yet available ..
}
- if( !isShowing ) {
+ if( !isVisible() ) {
if(DEBUG) {
- System.err.println(getThreadName()+": Info: GLCanvas setupPrint - skipped GL render, drawable valid, canvas not showing");
+ System.err.println(getThreadName()+": Info: GLCanvas setupPrint - skipped GL render, canvas not visible");
}
printActive = false;
return; // not yet available ..
diff --git a/src/jogl/classes/javax/media/opengl/awt/GLJPanel.java b/src/jogl/classes/javax/media/opengl/awt/GLJPanel.java
index adc0a0d23..fbd923a3b 100644
--- a/src/jogl/classes/javax/media/opengl/awt/GLJPanel.java
+++ b/src/jogl/classes/javax/media/opengl/awt/GLJPanel.java
@@ -437,7 +437,7 @@ public class GLJPanel extends JPanel implements AWTGLAutoDrawable, WindowClosing
@Override
public void display() {
- if( isShowing ) {
+ if( isShowing || ( printActive && isVisible() ) ) {
if (EventQueue.isDispatchThread()) {
// Want display() to be synchronous, so call paintImmediately()
paintImmediately(0, 0, getWidth(), getHeight());
@@ -627,9 +627,9 @@ public class GLJPanel extends JPanel implements AWTGLAutoDrawable, WindowClosing
printActive = false;
return; // not yet available ..
}
- if( !isShowing ) {
+ if( !isVisible() ) {
if(DEBUG) {
- System.err.println(getThreadName()+": Info: GLJPanel setupPrint - skipped GL render, drawable valid, panel not showing");
+ System.err.println(getThreadName()+": Info: GLJPanel setupPrint - skipped GL render, panel not visible");
}
printActive = false;
return; // not yet available ..
diff --git a/src/newt/classes/com/jogamp/newt/awt/NewtCanvasAWT.java b/src/newt/classes/com/jogamp/newt/awt/NewtCanvasAWT.java
index 1ed628435..f0cc68903 100644
--- a/src/newt/classes/com/jogamp/newt/awt/NewtCanvasAWT.java
+++ b/src/newt/classes/com/jogamp/newt/awt/NewtCanvasAWT.java
@@ -621,9 +621,9 @@ public class NewtCanvasAWT extends java.awt.Canvas implements WindowClosingProto
printActive = false;
return; // not yet available ..
}
- if( !isShowing() ) {
+ if( !isVisible() ) {
if(DEBUG) {
- System.err.println(currentThreadName()+": Info: NewtCanvasAWT setupPrint - skipped GL render, drawable valid, canvas not showing");
+ System.err.println(currentThreadName()+": Info: NewtCanvasAWT setupPrint - skipped GL render, canvas not visible");
}
printActive = false;
return; // not yet available ..