Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPatrick Tasse2014-06-09 16:15:09 -0400
committerPatrick Tasse2014-06-09 20:39:05 -0400
commit66e92beddc67f51046f690d9da93a819fbc89fd0 (patch)
treebf865c7e02e3f1912145690f856dfc158f85e901
parenta979f2f3c21b5dc39191c5ab588f96d440e7b308 (diff)
downloadorg.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.java17
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();
+ }
+ });
+
}
// ------------------------------------------------------------------------

Back to the top