I am facing problems when I updated Java on our application from version 8 to 11. I am aware of this HighDPI issues and that is why I also updated to newest JOGAMP libs (2.5.0).
I have Eclipse E4 RCP application, which works fine with SWT widgets. My GLCanvas is inside AWT frame that is created inside SWT composite using SWT_AWT bridge. Here is code snippet, how it is created (it is simplified code, I removed stuff that I do not consider important. I can provide more code if needed):
// Composite glComposite comes as argument to this method - parental composite
GLProfile profile = GLProfile.getDefault(GLProfile.getDefaultDevice());
GLCapabilities capabilities = new GLCapabilities(profile);
com.jogamp.opengl.awt.GLCanvas glCanvasAWT = new com.jogamp.opengl.awt.GLCanvas(capabilities);
When I resize my application, componentResized(ComponentEvent) is called and bounds of each object is printed to console. For some reason, they are not all the same - AWT frame and AWT Canvas bounds are smaller than SWT composite bounds and ratio between those bounds is corresponding to current monitor zoom (e.g.: Monitor zoom is 125%, SWT Composite bounds are 1000x1000 -> AWT frame bounds are 800x800).
This desynchronization happens only with zoom higher than 100% and it is of course causing my scene to "overlap" behind application. And of course, scene events are not working as expected when bounds are not correct.
Am I missing something in my code, is it somehow possible to fix this? Same code works fine on java 8 - bounds are same for SWT and AWT widgets.
Thank you for your answers in advance.
Adoptium Terumin jdk 11.0.20