Bug 79504 - shell not opened if previous shell was disposed when active
Summary: shell not opened if previous shell was disposed when active
Status: RESOLVED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: SWT (show other bugs)
Version: 3.1   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Steve Northover CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on: 80506
Blocks:
  Show dependency tree
 
Reported: 2004-11-25 12:04 EST by Platform-SWT-Inbox CLA
Modified: 2005-01-19 15:05 EST (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Fai Sigalov CLA 2004-11-25 12:04:03 EST
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();
    }
}
Comment 1 Fai Sigalov CLA 2004-12-10 09:51:04 EST
fixed by bug 80506
> 20041209