diff options
author | Silenio Quarti <silenio> | 2008-06-04 15:55:28 +0000 |
---|---|---|
committer | Silenio Quarti <silenio> | 2008-06-04 15:55:28 +0000 |
commit | 608beb35f915cd106a784fb5036621c19b21022a (patch) | |
tree | e84935b4a5b650d0993023b0d3a3cf3f3e06b487 /bundles/org.eclipse.swt/Eclipse SWT OpenGL | |
parent | bd31b2a1c1b1145033bf024a021aa38202ea12ed (diff) | |
download | eclipse.platform.swt-608beb35f915cd106a784fb5036621c19b21022a.tar.gz eclipse.platform.swt-608beb35f915cd106a784fb5036621c19b21022a.tar.xz eclipse.platform.swt-608beb35f915cd106a784fb5036621c19b21022a.zip |
*** empty log message ***
Diffstat (limited to 'bundles/org.eclipse.swt/Eclipse SWT OpenGL')
-rwxr-xr-x | bundles/org.eclipse.swt/Eclipse SWT OpenGL/cocoa/org/eclipse/swt/opengl/GLCanvas.java | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT OpenGL/cocoa/org/eclipse/swt/opengl/GLCanvas.java b/bundles/org.eclipse.swt/Eclipse SWT OpenGL/cocoa/org/eclipse/swt/opengl/GLCanvas.java index 066cfc010a..c4aa106a5d 100755 --- a/bundles/org.eclipse.swt/Eclipse SWT OpenGL/cocoa/org/eclipse/swt/opengl/GLCanvas.java +++ b/bundles/org.eclipse.swt/Eclipse SWT OpenGL/cocoa/org/eclipse/swt/opengl/GLCanvas.java @@ -110,18 +110,19 @@ public GLCanvas (Composite parent, int style, GLData data) { dispose (); SWT.error (SWT.ERROR_UNSUPPORTED_DEPTH); } - glView.initWithFrame(parent.view.frame(), pixelFormat); + glView.initWithFrame(parent.view.bounds(), pixelFormat); glView.setAutoresizingMask(OS.NSViewWidthSizable | OS.NSViewHeightSizable); + parent.view.addSubview_(glView); Listener listener = new Listener () { public void handleEvent (Event event) { switch (event.type) { - case SWT.Dispose: - if (glView != null) glView.release(); - glView = null; - if (pixelFormat != null) pixelFormat.release(); - pixelFormat = null; - break; + case SWT.Dispose: + if (glView != null) glView.release(); + glView = null; + if (pixelFormat != null) pixelFormat.release(); + pixelFormat = null; + break; } } }; |