Login  Register

Re: Problem with GLCanvas in Eclipse RCP application

Posted by Sven Gothel on Jan 10, 2013; 7:45pm
URL: https://forum.jogamp.org/Problem-with-GLCanvas-in-Eclipse-RCP-application-tp4027754p4027784.html

On 01/10/2013 03:11 PM, Celine [via jogamp] wrote:
> It seems that with Java 7, the GraphicsConfiguration of the AWT GLCanvas is
> changed when the window is moved to the second screen and the component peer
> is recreated.
> In a pure AWT application, we can see a "blinking" but with SWT, this change
> causes the creation of a new window.
Thank you!

When it 'blinks', will the GLCanvas stay alive - or is it recreated?
The latter would imply destruction and recreation of the context/drawable
and hence calling destroy(..) and init(..) of all GLEventListeners.

> I don't know why the NewtCanvasAWT is not detached...
NewtCanvasAWT mechanism is different, it attaches to the AWT native peer
Window handle (here a HWND). Hence it seems that the HWND persists (still valid).


>
> I post a message about this new weird behavior of Java7 on Java forum, they
> advice me to file a bug at http://bugs.sun.com/ because it needs to be evaluated.

Could be a bug in SWT as well .. of course.

It's IMHO valid to change the AWT GraphicsConfig of the peer
when you switch screens .. but hey, let them make that decision. :)
However - assuming we use the 'big desktop' setup - all monitors should
be on the same [virtual] screen w/ compatible native configs (HDC ..).

I would also notify the SWT folks, since this AWT
behavioral change really seems to affect them.

Feel free to reference our discussion there.

~Sven



signature.asc (909 bytes) Download Attachment