Bug #1431 - NewtCanvasAWT broken: Resize not working
With version 2.4.0 (still existing in 2.5.0) came a new error/bug. A bug ticket was already raised in march 2023 by someone else (bug number 1431).
Unfortunately the bug is not yet confirmed.
I have the same problem. I can confirm the problem with the example code attached in the bug report and in our real world application as well.
To make it short: The NewtCanvasAWT in a Linux enviroment is not resizeable. If you change the size of the window/canvas the rendering stops.
From my perspective it's a show stopper. Jogl is broken (with NewtCanvasAWT under Linux).
I'm only saying this so clearly because I have the feeling that the relevance of the bug has been underrated so far.
I tried to locate the bug, but I failed. The debug messages gave no hint to me. I think the parenting lost during/after the resize.
There is a kind of workaround, but it's very ugly: Add a resize listener to the frame and in every resize event remove and add the NewtCanvasAWT from/to the component.
You can shorten that by calling only removeNotify and addNotify in the NewtCanvasAWT component. But this isn't a proper solution.
I also noticed that rendering in a multi-monitor environment works again after moving the window to another monitor (but only until the next resize). I think it's because of the the calls of removeNotify/addNotify which are caused by the monitor device change.
I know that time/attention is a valuable commodity in an open source project. Hence I can offer support for fixing the bug. But I would need a hint what/where is the problem.
Details of my environment: Rocky Linux 8, nvidia GPU, JDK 8/11/17