| Summary: | [Widgets] tracker not closed if mouse up event occurs outside of tree | ||
|---|---|---|---|
| Product: | [Eclipse Project] Platform | Reporter: | Andrei Diaconu <andi_dm1> |
| Component: | SWT | Assignee: | Platform-SWT-Inbox <platform-swt-inbox> |
| Status: | CLOSED WONTFIX | QA Contact: | Felipe Heidrich <eclipse.felipe> |
| Severity: | normal | ||
| Priority: | P3 | CC: | andi_dm1, Silenio_Quarti |
| Version: | 3.5 | Keywords: | triaged |
| Target Milestone: | --- | ||
| Hardware: | PC | ||
| OS: | Windows XP | ||
| Whiteboard: | stalebug | ||
This is a one-off bulk update. (The last one in the triage migration). Moving bugs from swt-triaged@eclipse to platform-swt-inbox@eclipse.org and adding "triaged" keyword as per new triage process: https://wiki.eclipse.org/SWT/Devel/Triage See Bug 518478 for details. Tag for notification/mail filters: @TriageBulkUpdate 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. As such, we're closing this bug. If you have further information on the current state of the bug, please add it and reopen this bug. 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. -- The automated Eclipse Genie. |
For the following snippet, click on the tree to create a resize tracker, move the mouse outside the tree, and release the mouse button. You will notice that the tracker is not closed, and you can continue to change the tracker size if you move the mouse beck into the tree area. Also, many time, but not always, it leaves cheese on the application below (Eclipse), when the shell is closed. If you change the type of variable "composite" from Tree to Composite, the tracker is disposed when you release the mouse button even if outside the shell. import org.eclipse.swt.SWT; import org.eclipse.swt.graphics.Rectangle; import org.eclipse.swt.layout.FillLayout; import org.eclipse.swt.widgets.*; public class TrackerBug { public static void main(String[] args) { final Display display = new Display(); final Shell shell = new Shell(display); shell.setSize(200, 200); shell.setLayout(new FillLayout()); final Composite composite = new Tree(shell, SWT.NONE); composite.addListener(SWT.MouseDown, new Listener() { @Override public void handleEvent(Event e) { final Tracker tracker = new Tracker(composite, SWT.RESIZE); tracker.setRectangles(new Rectangle[] {new Rectangle(e.x, e.y, 0, 0)}); tracker.open(); } }); shell.open(); while (!shell.isDisposed()) { if (!display.readAndDispatch()) display.sleep(); } display.dispose(); } }