Summary: | JOGL 2.4 + X11: NewtCanvasAWT resize is completely broken | ||
---|---|---|---|
Product: | [JogAmp] Newt | Reporter: | crougier |
Component: | x11 | Assignee: | Sven Gothel <sgothel> |
Status: | RESOLVED FIXED | ||
Severity: | critical | CC: | danny.koernig |
Priority: | P2 | ||
Version: | 2.6.0 | ||
Hardware: | All | ||
OS: | all | ||
Type: | DEFECT | SCM Refs: |
a0e6d5883de009d4649d011633090d7660fa229a
|
Workaround: | --- | ||
Attachments: |
JOGLQuadNewt example
Screenshot |
Created attachment 858 [details]
Screenshot
Thank you, I will look at at soon. Reproduced with given test as well as with out unit test com.jogamp.opengl.test.junit.jogl.demos.es2.newt.TestGearsES2NewtCanvasAWT (In reply to Sven Gothel from comment #3) Culprit is commit ad38d1559854985b1131e5b6c7274a392b5bc265 commit a0e6d5883de009d4649d011633090d7660fa229a Bug 1431: Fix NewtCanvasAWT resize on X11, broken since commit ad38d1559854985b1131e5b6c7274a392b5bc265 Commit ad38d1559854985b1131e5b6c7274a392b5bc265 introduced XTranslateCoordinates(..) to safely validate the client-space window position against the parent (root). Totally missing in this change was the NEWT child window case since it always used the root-window as the destination. This change tracks the parent-window (valid parent Window or NULL) within the JavaWindow struct and either uses the parent-window if available or the root-window for XTranslateCoordinates(..). This results in the proper client-space position. Validated against - TestGearsES2NewtCanvasAWT - TestBug1431NewtCanvasAWT on Debian 12 w/ Java17. |
Created attachment 857 [details] JOGLQuadNewt example Each time NewtCanvasAWT is resized, the viewport moves down and to the right and the rendering eventually disappears. It can be reproduced with the attached JOGLQuadNewt example with JOGL 2.4.0 on Ubuntu. No issue with JOGL 2.3.2. Tested on Ubuntu 20.04 with OpenJDK 11.0.12+7 and OpenJDK 17.0.6+10.