Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSnjezana Peco2015-05-14 08:16:41 +0000
committerAlexander Kurtakov2015-05-18 08:39:32 +0000
commit28ac128ec47e5a30f68629d0b81dac5ba61e2eb4 (patch)
tree5d66070035a2d6e9bb8a88cd78f802778c40148a
parent3f33b5c55d71d4c006db77420b39dfc5beb8fbfc (diff)
downloadeclipse.platform.swt-28ac128ec47e5a30f68629d0b81dac5ba61e2eb4.tar.gz
eclipse.platform.swt-28ac128ec47e5a30f68629d0b81dac5ba61e2eb4.tar.xz
eclipse.platform.swt-28ac128ec47e5a30f68629d0b81dac5ba61e2eb4.zip
Bug 438505 - [GTK3] Problem with table/tree editing
Change-Id: I0038080544c6cbfae7fa8abee54b7660dea2dc3b Signed-off-by: Snjezana Peco <snjeza.peco@gmail.com>
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Table.java6
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Tree.java3
2 files changed, 8 insertions, 1 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Table.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Table.java
index 1c58e9a5e6..20b2459db8 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Table.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Table.java
@@ -1470,7 +1470,11 @@ public TableItem getItem (Point point) {
if (point == null) error (SWT.ERROR_NULL_ARGUMENT);
long /*int*/ [] path = new long /*int*/ [1];
OS.gtk_widget_realize (handle);
- if (!OS.gtk_tree_view_get_path_at_pos (handle, point.x, point.y, path, null, null, null)) return null;
+ int y = point.y;
+ if (getHeaderVisible() && OS.GTK_VERSION > OS.VERSION(3, 9, 0)) {
+ y -= getHeaderHeight();
+ }
+ if (!OS.gtk_tree_view_get_path_at_pos (handle, point.x, y, path, null, null, null)) return null;
if (path [0] == 0) return null;
long /*int*/ indices = OS.gtk_tree_path_get_indices (path [0]);
TableItem item = null;
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Tree.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Tree.java
index 3c14d8cd85..cef483d5ce 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Tree.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Tree.java
@@ -1480,6 +1480,9 @@ public TreeItem getItem (Point point) {
OS.gtk_widget_realize (handle);
int x = point.x;
int y = point.y;
+ if (getHeaderVisible() && OS.GTK_VERSION > OS.VERSION(3, 9, 0)) {
+ y -= getHeaderHeight();
+ }
if ((style & SWT.MIRRORED) != 0) x = getClientWidth () - x;
long /*int*/ [] columnHandle = new long /*int*/ [1];
if (!OS.gtk_tree_view_get_path_at_pos (handle, x, y, path, columnHandle, null, null)) return null;

Back to the top