diff options
author | Billy Biggs <bbiggs> | 2006-05-01 16:34:04 +0000 |
---|---|---|
committer | Billy Biggs <bbiggs> | 2006-05-01 16:34:04 +0000 |
commit | 4ad139a9c50c411ee270c87586a8c7dabceb1734 (patch) | |
tree | 77762ac871d38aed991edbeead4d207c022977b2 /bundles/org.eclipse.swt/Eclipse SWT OpenGL | |
parent | d5f5fc171401fef8aed33ffe2b8127f392527aee (diff) | |
download | eclipse.platform.swt-4ad139a9c50c411ee270c87586a8c7dabceb1734.tar.gz eclipse.platform.swt-4ad139a9c50c411ee270c87586a8c7dabceb1734.tar.xz eclipse.platform.swt-4ad139a9c50c411ee270c87586a8c7dabceb1734.zip |
Bug 133962. SWTException closing GLCanvas in an RCP application on Mac OS X.
Diffstat (limited to 'bundles/org.eclipse.swt/Eclipse SWT OpenGL')
-rwxr-xr-x | bundles/org.eclipse.swt/Eclipse SWT OpenGL/carbon/org/eclipse/swt/opengl/GLCanvas.java | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT OpenGL/carbon/org/eclipse/swt/opengl/GLCanvas.java b/bundles/org.eclipse.swt/Eclipse SWT OpenGL/carbon/org/eclipse/swt/opengl/GLCanvas.java index 26b1b0c37d..49ce73d1c0 100755 --- a/bundles/org.eclipse.swt/Eclipse SWT OpenGL/carbon/org/eclipse/swt/opengl/GLCanvas.java +++ b/bundles/org.eclipse.swt/Eclipse SWT OpenGL/carbon/org/eclipse/swt/opengl/GLCanvas.java @@ -121,6 +121,17 @@ public GLCanvas (Composite parent, int style, GLData data) { case SWT.Dispose: AGL.aglDestroyContext (context); AGL.aglDestroyPixelFormat (pixelFormat); + // Remove listeners + Shell shell = getShell(); + shell.removeListener(SWT.Resize, this); + shell.removeListener(SWT.Show, this); + shell.removeListener(SWT.Hide, this); + Control c = GLCanvas.this; + do { + c.removeListener(SWT.Show, this); + c.removeListener(SWT.Hide, this); + c = c.getParent(); + } while (c != shell); break; case SWT.Resize: case SWT.Hide: |