Project: SWT
Bug 130876 Background Image not inherited running w/o manifest
Reported: 2006-03-08 05:00:32 | Status: resolved fixed

Tested with 3.2 M5a and latest IBuild. The following snippet is problematic running it without the manifest. The buttons dont inherit the background image: public class Main { static Image oldImage; public static void main(String[] args) { final Display display = new Display(); final Shell shell = new Shell(display); shell.setBackgroundMode(SWT.INHERIT_DEFAULT); FillLayout layout1 = new FillLayout(SWT.VERTICAL); layout1.marginWidth = layout1.marginHeight = 10; shell.setLayout(layout1); Group group = new Group(shell, SWT.NONE); group.setText("Group "); RowLayout layout2 = new RowLayout(SWT.VERTICAL); layout2.marginWidth = layout2.marginHeight = layout2.spacing = 10; group.setLayout(layout2); for (int i = 0; i < 8; i++) { Button button = new Button(group, SWT.RADIO); button.setText("Button " + i); } shell.addListener(SWT.Resize, new Listener() { public void handleEvent(Event event) { Rectangle rect = shell.getClientArea(); Image newImage = new Image(display, Math.max(1, rect.width), 1); GC gc = new GC(newImage); gc.setForeground(display.getSystemColor(SWT.COLOR_WHITE)); gc.setBackground(display.getSystemColor(SWT.COLOR_BLUE)); gc.fillGradientRectangle(rect.x, rect.y, rect.width, 1, false); gc.dispose(); shell.setBackgroundImage(newImage); if (oldImage != null) oldImage.dispose(); oldImage = newImage; } }); shell.pack(); shell.open(); while (!shell.isDisposed()) { if (!display.readAndDispatch()) display.sleep(); } if (oldImage != null) oldImage.dispose(); display.dispose(); } } Snippet was taken from 3.2 M4 N&N btw. Ben

Files changed in fix:
bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Button.java bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Label.java