| Summary: | shell not opened if previous shell was disposed when active | ||
|---|---|---|---|
| Product: | [Eclipse Project] Platform | Reporter: | Platform-SWT-Inbox <platform-swt-inbox> |
| Component: | SWT | Assignee: | Steve Northover <snorthov> |
| Status: | RESOLVED FIXED | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | ||
| Version: | 3.1 | ||
| Target Milestone: | --- | ||
| Hardware: | PC | ||
| OS: | Windows XP | ||
| Whiteboard: | |||
| Bug Depends on: | 80506 | ||
| Bug Blocks: | |||
Run the following code snippet. If a shell is created, forced active, then disposed, a new shell created and opened, the new shell won't open. (It's created, but not given focus, or drawn on the display). If the old shell isn't forced active or not disposed, the new shell does open. import org.eclipse.swt.widgets.Display; import org.eclipse.swt.widgets.Shell; public class ShellActive { public static void main(String[] args) { Display display = new Display(); Shell shell = new Shell(display); shell.forceActive(); shell.dispose(); shell = new Shell(display); shell.pack(); shell.open(); while (!shell.isDisposed()) { if (!display.readAndDispatch()) display.sleep(); } display.dispose(); } }