Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 186557 - No Deactivate events from ON_TOP shells
Summary: No Deactivate events from ON_TOP shells
Status: RESOLVED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: SWT (show other bugs)
Version: 3.3   Edit
Hardware: PC Linux-GTK
: P3 normal (vote)
Target Milestone: 3.3 RC1   Edit
Assignee: Kevin Barnes CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-05-11 09:50 EDT by Kevin Barnes CLA
Modified: 2007-05-17 17:26 EDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Kevin Barnes CLA 2007-05-11 09:50:18 EDT
ON_TOP shells are no longer sending deactivate events. 

	public static void main(String[] args) {
		final Display display = new Display();
		final Shell shell = new Shell(display);
		final Shell ontop = new Shell(shell, SWT.ON_TOP);
		ontop.addListener(SWT.Deactivate, new Listener() {
			public void handleEvent(Event event) {
				System.out.println("\t\tdeactivate");
				ontop.dispose();
			}			
		});
		ontop.setBounds(205, 205, 100, 100);
		shell.setBounds(200, 200, 300, 300);
		shell.open();
		ontop.open();
		while (!shell.isDisposed()) {
			if (!display.readAndDispatch())
				display.sleep();
		}
		display.dispose();
	}
Comment 1 Silenio Quarti CLA 2007-05-11 12:00:26 EDT
+1
Comment 2 Kevin Barnes CLA 2007-05-11 12:06:16 EDT
fixed > 20070511