Community
Participate
Working Groups
1) Press the giant button to open a popup shell. 2) Click back on the titlebar of the first shell. bug: Deactivate event is received twice. When I found this, my deactivate listener was eventually disposing the shell, which caused problems when I tried to do it twice. public class ShellSnippet { static final Display display = new Display(); static Shell shell; public static void main(String[] args) { shell = new Shell(display); shell.setLayout(new FillLayout()); shell.setSize(400, 300); new Button(shell, SWT.PUSH).addListener(SWT.Selection, new Listener() { public void handleEvent(Event event) { popup(); } }); shell.open(); while (!shell.isDisposed()) while (!display.readAndDispatch()) display.sleep(); } static void popup() { final Shell popup = new Shell(); popup.pack(); popup.addListener(SWT.Deactivate, new Listener() { public void handleEvent(Event event) { System.out.println("Deactivate"); popup.setVisible(false); } }); popup.addListener(SWT.Activate, new Listener() { public void handleEvent(Event event) { System.out.println("Activate"); } }); popup.open(); } }
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet. If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.