Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorXi Yan2019-03-21 15:35:08 -0400
committerXi Yan2019-03-21 16:14:44 -0400
commitb667ac9050fc862dd311cc1d879264b44d79517f (patch)
tree54b437fe863d62f6313c6348e162c6f50ce5fb37
parentdf537ae6cf06e25020588d63610d390565d548e3 (diff)
downloadeclipse.platform.swt-b667ac9050fc862dd311cc1d879264b44d79517f.tar.gz
eclipse.platform.swt-b667ac9050fc862dd311cc1d879264b44d79517f.tar.xz
eclipse.platform.swt-b667ac9050fc862dd311cc1d879264b44d79517f.zip
Bug 545645 - [GTK] Table/Tree header must not keep focus
Set table/tree header button focus on click to false. Change-Id: If618e1e1b0d47209fd1634f34c6693287a14a11d Signed-off-by: Xi Yan <xixiyan@redhat.com>
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Table.java1
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Tree.java1
2 files changed, 2 insertions, 0 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 fe2004a0ec..51d04a68f2 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
@@ -686,6 +686,7 @@ void createItem (TableColumn column, int index) {
column.imageHandle = imageHandle;
GTK.gtk_tree_view_column_set_widget (column.handle, boxHandle);
column.buttonHandle = GTK.gtk_tree_view_column_get_button(column.handle);
+ GTK.gtk_widget_set_focus_on_click(column.buttonHandle, false);
if (columnCount == columns.length) {
TableColumn [] newColumns = new TableColumn [columns.length + 4];
System.arraycopy (columns, 0, newColumns, 0, columns.length);
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 6d6400a145..24ff1555a6 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
@@ -852,6 +852,7 @@ void createItem (TreeColumn column, int index) {
column.imageHandle = imageHandle;
GTK.gtk_tree_view_column_set_widget (column.handle, boxHandle);
column.buttonHandle = GTK.gtk_tree_view_column_get_button(column.handle);
+ GTK.gtk_widget_set_focus_on_click(column.buttonHandle, false);
if (columnCount == columns.length) {
TreeColumn [] newColumns = new TreeColumn [columns.length + 4];
System.arraycopy (columns, 0, newColumns, 0, columns.length);

Back to the top