Re: SWT ScrolledComposite not working under Mac Mountain Lion
Posted by
Sven Gothel on
Nov 29, 2012; 4:27pm
URL: https://forum.jogamp.org/SWT-ScrolledComposite-not-working-under-Mac-Mountain-Lion-tp4027271p4027304.html
On 11/29/2012 02:14 PM, samg [via jogamp] wrote:
> gouessej wrote
> Yes it clarifies the problem but I would like to know what happens if you
> replace SWT GLCanvas by org.eclipse.swt.widgets.Canvas to be absolutely
> sure that the bug comes from the SWT GLCanvas and not from
> org.eclipse.swt.widgets.Canvas. com.jogamp.opengl.swt.GLCanvas extends
> org.eclipse.swt.widgets.Canvas, that's why I wonder whether the bug
> doesn't come from SWT.
>
> ok
>
> I tested to replace the glcanvas code from above with
>
> Canvas canvas = new Canvas(scrolledComposite, SWT.None);
> canvas.addPaintListener(new PaintListener() {
> @Override
> public void paintControl(PaintEvent arg0) {
> GC gc = arg0.gc;
> gc.setBackground(arg0.display.getSystemColor(SWT.COLOR_RED));
> gc.fillRectangle(100, 100, 50, 50);
> }
> });
>
>
> and it worked as expected.
>
> So it has to do something with the way how JOGL determines the window position
> and size. As internally the ScrolledComposite calls the "setLocation" method
> of the Widget to move it around within the ScrolledComposite.
+++
Will you be so kind and create a bug report for this,
while adding all your information to it (as already discussed here)?
Pls also add the 2 _complete_ [unit] test cases, so I have a bit less work.
Will discuss it in bug report then, to avoid noise and to make discussion
persistent.
Thank you.