aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2014-10-02 20:42:19 +0200
committerSven Gothel <[email protected]>2014-10-02 20:42:53 +0200
commit8126c9e9e4fd33f86d2c298f7a2cad4b0f838074 (patch)
tree2bf08e1ed373ef6dab3f73bb1f3cf86ce23c6ffd
parent0afcbef35ca262a826db025c053dc09a60a0596b (diff)
Bug 1085: Fix GLJPanel regression while printing w/ invisible GLJPanel: Zero size panel sizev2.2.3
This is a regression due to commit 84f367a73c5b16dcebfd877e82e1c2cb90ae74ce: GLJPanel Cleanup: Remove initial FBO reshape; ** Propagate reshape only if differs from panel-size; ** <- this one Use pre-fetched panel-size. Above commit only issued 'sendReshape' if the reshape-size differs from the actual panel-size. Note: The reshape-size is propagated to panel-size either in [1] initializeBackendImpl(..) or [2] handleReshape(..) @ paintComponent. While printing w/ an invisible GLJPanel the reshape-size has not yet propagated to the panel-size (see above) and two consecutive reshape calls will cause the last one to be dropped. With this patch we have: GLJPanel.addNotify() GLJPanel.reshape.0 null resize [paint] [ this 0x0, pixelScale 1x1, panel 560x420] -> 0x0 * 1x1 -> 0x0, reshapeSize 0x0 GLJPanel.reshape.0 null resize [paint] [ this 560x420, pixelScale 1x1, panel 560x420] -> 560x420 * 1x1 -> 560x420, reshapeSize 560x420 GLJPanel.setupPrint: scale 1.000000 / 1.000000, samples 0, tileSz -1 x -1 GLJPanel.createAndInitializeBackend.1: [printing] 560x420 @ scale 1x1 -> 560x420 @ scale 1x1 A
-rw-r--r--src/jogl/classes/javax/media/opengl/awt/GLJPanel.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/jogl/classes/javax/media/opengl/awt/GLJPanel.java b/src/jogl/classes/javax/media/opengl/awt/GLJPanel.java
index 9ea5459ae..a09644951 100644
--- a/src/jogl/classes/javax/media/opengl/awt/GLJPanel.java
+++ b/src/jogl/classes/javax/media/opengl/awt/GLJPanel.java
@@ -675,7 +675,7 @@ public class GLJPanel extends JPanel implements AWTGLAutoDrawable, WindowClosing
private void reshapeImpl(final int width, final int height) {
final int scaledWidth = width * hasPixelScale[0];
final int scaledHeight = height * hasPixelScale[1];
- if( !printActive && ( scaledWidth != panelWidth || scaledHeight != panelHeight ) ) {
+ if( !printActive && ( handleReshape || scaledWidth != panelWidth || scaledHeight != panelHeight ) ) {
reshapeWidth = scaledWidth;
reshapeHeight = scaledHeight;
handleReshape = true;