Fix for bug 381426: Events table not showing event rank.
[deliverable/tracecompass.git] / org.eclipse.linuxtools.tmf.ui / src / org / eclipse / linuxtools / tmf / ui / viewers / events / TmfEventsTable.java
index a2e77069950947737aff33ee9a93e5951d056391..0df48185747ca2039ae9b166fda101ed8f6e2d39 100644 (file)
@@ -370,7 +370,15 @@ ITmfEventsFilterProvider {
                         label.addListener(SWT.MouseDown, this);\r
                         label.addListener(SWT.MouseWheel, this);\r
                         final Point size = tooltipShell.computeSize(SWT.DEFAULT, SWT.DEFAULT);\r
-                        Point pt = fTable.toDisplay(event.x, event.y);\r
+                        /*\r
+                         * Bug in Linux.  The coordinates of the event have an origin that excludes the table header but\r
+                         * the method toDisplay() expects coordinates relative to an origin that includes the table header.\r
+                         */\r
+                        int y = event.y;\r
+                        if (System.getProperty("os.name").contains("Linux")) { //$NON-NLS-1$ //$NON-NLS-2$\r
+                            y += fTable.getHeaderHeight();\r
+                        }\r
+                        Point pt = fTable.toDisplay(event.x, y);\r
                         pt.x += BOOKMARK_IMAGE.getBounds().width;\r
                         pt.y += size.y;\r
                         tooltipShell.setBounds(pt.x, pt.y, size.x, size.y);\r
This page took 0.024243 seconds and 5 git commands to generate.