}
}
};
Shell shell = parent.getShell ();
shell.addListener (SWT.Deiconify, shellListener);
shell.addListener (SWT.Iconify, shellListener);
parent.addListener (SWT.Dispose, new Listener () {
public void handleEvent (Event event) {
Shell shell = parent.getShell ();
shell.removeListener (SWT.Deiconify, shellListener);
shell.removeListener (SWT.Iconify, shellListener);