Bug 223339 [PopupDialog] ordering of size and location menu items
bundles/org.eclipse.jface/src/org/eclipse/jface/dialogs/PopupDialog.java
public void handleEvent(Event event) {
				/*
				 * Close if we are deactivating and have no child shells. If we
				 * have child shells, we are deactivating due to their opening.
				 * On X, we receive this when a menu child (such as the system
				 * menu) of the shell opens, but I have not found a way to
				 * distinguish that case here. Hence bug #113577 still exists.
				 */
				if (listenToDeactivate && event.widget == getShell()
						&& getShell().getShells().length == 0) {
					asyncClose();
				} else {
					/*
					 * We typically ignore deactivates to work around
					 * platform-specific event ordering. Now that we've ignored
					 * whatever we were supposed to, start listening to
					 * deactivates. Example issues can be found in
					 * https://bugs.eclipse.org/bugs/show_bug.cgi?id=123392
					 */
					listenToDeactivate = true;
				}
			}
		});
		
		
		shell.addListener(SWT.Activate, new Listener() {
			public void handleEvent(Event event) {
				
				if (event.widget == getShell()
						&& getShell().getShells().length == 0) {