Bug 154732 GraphicsAntialiasingTab fails under both Motif and GTK
When selecting the GraphicsAntialiasingTab, the GraphicsExample application dies. Steps for reproducing: - Check out org.eclipse.swt.examples from CVS - Put the attached file in your workspace under org.eclipse.swt.examples.graphics - Run the graphics example - In the tree, expand "Antialiasing" and select "Graphics" On Motif, the following output is displayed: X connection to :0.0 broken (explicit kill or server shutdown). On GTK, the following output is displayed: The application 'SWT' lost its connection to the display :0.0; most likely the X server was shut down or you killed/destroyed the application.
examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/graphics/GraphicAntialiasTab.java
public void handleEvent(Event event) {
			final Button button = (Button) event.widget;
			final Composite parent = button.getParent(); 
			Rectangle bounds = button.getBounds();
			Point point = parent.toDisplay(new Point(bounds.x, bounds.y));
			menu.setLocation(point.x, point.y + bounds.height);
			menu.setVisible(true);
		}
	});
}
/* (non-Javadoc)
 * @see org.eclipse.swt.examples.graphics.GraphicsTab#paint(org.eclipse.swt.graphics.GC, int, int)
 */
public void paint(GC gc, int width, int height) {
	if (!example.checkAdvancedGraphics()) return;
	Device device = gc.getDevice();
	
	if (ovalColorGB != null && ovalColorGB.getBgColor1() != null)
		gc.setBackground(ovalColorGB.getBgColor1());
	
	gc.setAntialias(aliasValues[aliasCombo.getSelectionIndex()]);
	Path path = new Path(device);
	for(int i=0; i < 75; i++) {
		path.addArc(2*width/3-(25*i), height/3-(10*i), 50+(50*i), 30+(20*i), 0, 360);
	}
	gc.fillPath(path);
	path.dispose();
}
}