diff options
author | Patrick Tasse | 2014-06-09 20:15:09 +0000 |
---|---|---|
committer | Patrick Tasse | 2014-06-10 00:39:05 +0000 |
commit | 66e92beddc67f51046f690d9da93a819fbc89fd0 (patch) | |
tree | bf865c7e02e3f1912145690f856dfc158f85e901 | |
parent | a979f2f3c21b5dc39191c5ab588f96d440e7b308 (diff) | |
download | org.eclipse.linuxtools-66e92beddc67f51046f690d9da93a819fbc89fd0.tar.gz org.eclipse.linuxtools-66e92beddc67f51046f690d9da93a819fbc89fd0.tar.xz org.eclipse.linuxtools-66e92beddc67f51046f690d9da93a819fbc89fd0.zip |
tmf: Bug 437000: Queue overflow dragging events table thumb in Linux
Inhibit table refresh on the SWT.NONE slider selection event and perform
refresh on slider mouse up instead.
Change-Id: I38a6e94874f51636533cd6193ed9b2bc3e46b263
Signed-off-by: Patrick Tasse <patrick.tasse@gmail.com>
Reviewed-on: https://git.eclipse.org/r/28235
Tested-by: Hudson CI
Reviewed-by: Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
Tested-by: Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
-rw-r--r-- | lttng/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/widgets/virtualtable/TmfVirtualTable.java | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/lttng/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/widgets/virtualtable/TmfVirtualTable.java b/lttng/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/widgets/virtualtable/TmfVirtualTable.java index 0940ac13d6..7971433598 100644 --- a/lttng/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/widgets/virtualtable/TmfVirtualTable.java +++ b/lttng/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/widgets/virtualtable/TmfVirtualTable.java @@ -579,7 +579,6 @@ public class TmfVirtualTable extends Composite { switch (event.detail) { case SWT.ARROW_DOWN: case SWT.ARROW_UP: - case SWT.NONE: case SWT.END: case SWT.HOME: case SWT.PAGE_DOWN: @@ -588,11 +587,27 @@ public class TmfVirtualTable extends Composite { refreshTable(); break; } + // Not handled because of bug on Linux described below. + case SWT.NONE: default: break; } } }); + + /* + * In Linux, the selection event above has event.detail set to SWT.NONE + * instead of SWT.DRAG during dragging of the thumb. To prevent refresh + * overflow, only update the table when the mouse button is released. + */ + fSlider.addMouseListener(new MouseAdapter() { + @Override + public void mouseUp(MouseEvent e) { + fTableTopEventRank = fSlider.getSelection(); + refreshTable(); + } + }); + } // ------------------------------------------------------------------------ |