Project: SWT
Bug 261732 progress does not animate if create before Shell.open()
Reported: 2009-01-20 18:01:59 | Status: resolved fixed

public static void main (String [] args) { try { final Display display = new Display(); final Shell shell = new Shell(display); shell.setLayout(new FillLayout()); Composite comp = new Composite(shell, SWT.NONE); shell.pack(); shell.open(); final ProgressBar bar = new ProgressBar(comp, SWT.INDETERMINATE); bar.pack(); //shell.open(); while (!shell.isDisposed ()) { if (!display.readAndDispatch ()) display.sleep (); } display.dispose (); } catch (Throwable e) { e.printStackTrace(); } }

Files changed in fix:
bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSView.java bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/OS.java bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Display.java bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/ProgressBar.java bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Widget.java