@Override
			public void widgetDisposed(DisposeEvent e) {
				Display d = Display.getCurrent();
				Menu bar = d.getMenuBar();
				boolean hasAppMenuBar = (bar != null);
				if (!hasAppMenuBar) {
					shell.getMenuBar().dispose();
					Shell[] shells = d.getShells();
					if ((shells.length == 1) && (shells[0] == shell)) {
						if (!d.isDisposed()) d.dispose();
					}
				}					
			}