Bug 242466 [JFace] Widget is disposed error when closing dialog from OSX dock
- run the snippet below which shows a dialog - right-click its icon in the OSX dock and select Quit -> the exception at the bottom will be spewed - it looks like the last line of Window.runEventLoop(Shell) should change from: display.update(); to... if (!display.isDisposed()) display.update(); snippet: public static void main (String [] args) { try { final Display display = new Display (); final Shell shell = new Shell (display); TitleAreaDialog dialog = new TitleAreaDialog(shell); dialog.setBlockOnOpen(true); dialog.open(); display.dispose (); } catch (Exception e) { e.printStackTrace(); } } exception: org.eclipse.swt.SWTException: Widget is disposed at org.eclipse.swt.SWT.error(SWT.java:3777) at org.eclipse.swt.SWT.error(SWT.java:3695) at org.eclipse.swt.SWT.error(SWT.java:3666) at org.eclipse.swt.widgets.Display.error(Display.java:1126) at org.eclipse.swt.widgets.Display.checkDevice(Display.java:626) at org.eclipse.swt.widgets.Display.update(Display.java:4084) at org.eclipse.jface.window.Window.runEventLoop(Window.java:832) at org.eclipse.jface.window.Window.open(Window.java:801) at win32.Main1.main(Main1.java:20)
bundles/org.eclipse.jface/src/org/eclipse/jface/window/Window.java
* the left and 1/2 to the right) and vertically (1/3 above and 2/3 below)
	 * relative to the parent shell, or display bounds if there is no parent
	 * shell.
	 * 
	 * @param initialSize
	 *            the initial size of the shell, as returned by
	 *            <code>getInitialSize</code>.
	 * @return the initial location of the shell
	 */
	protected Point getInitialLocation(Point initialSize) {
		Composite parent = shell.getParent();
		Monitor monitor = shell.getDisplay().getPrimaryMonitor();
		if (parent != null) {
			monitor = parent.getMonitor();
		}
		Rectangle monitorBounds = monitor.getClientArea();
		Point centerPoint;
		if (parent != null) {
			centerPoint = Geometry.centerPoint(parent.getBounds());
		} else {
			centerPoint = Geometry.centerPoint(monitorBounds);
		}
		return new Point(centerPoint.x - (initialSize.x / 2), Math.max(
				monitorBounds.y, Math.min(centerPoint.y
						- (initialSize.y * 2 / 3), monitorBounds.y
						+ monitorBounds.height - initialSize.y)));
	}
	/**
	 * Returns the initial size to use for the shell. The default implementation
	 * returns the preferred size of the shell, using