Bug 119599 [Dialogs] Every PopupDialiog is leaked if PopupDialolg.HOVER_SHELLSTYLE or SWT.ON_TOP is set
I20051206-1200 Every PopupDialiog is leaked if PopupDialolg.HOVER_SHELLSTYLE or SWT.ON_TOP is set. Reason: a deactivate listener is added to the popup shell's parent but is never removed.
bundles/org.eclipse.jface/src/org/eclipse/jface/dialogs/PopupDialog.java
});
		
		
		shell.addListener(SWT.Activate, new Listener() {
			public void handleEvent(Event event) {
				
				if (event.widget == getShell()
						&& getShell().getShells().length == 0) {
					listenToDeactivate = true;
					
					
					
					
					listenToParentDeactivate = !"carbon".equals(SWT.getPlatform()); 
				}
			}
		});
		if ((getShellStyle() & SWT.ON_TOP) != 0 && shell.getParent() != null) {
			shell.getParent().addListener(SWT.Deactivate, new Listener() {
				public void handleEvent(Event event) {
					if (listenToParentDeactivate) {
						close();
					} else {
						
						listenToParentDeactivate = listenToDeactivate;
					}
				}
			});
		}