diff options
author | Steve Northover <steve> | 2007-03-02 20:59:11 +0000 |
---|---|---|
committer | Steve Northover <steve> | 2007-03-02 20:59:11 +0000 |
commit | cf0ef481d38bf3ce2b181b6a518e656c9437a1c8 (patch) | |
tree | 78a302d22baf405d5d3854c9b4dfce129db24290 /bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/List.java | |
parent | 3f050d0d0fc8d0194869d65b823ccab5c4d948c0 (diff) | |
download | eclipse.platform.swt-cf0ef481d38bf3ce2b181b6a518e656c9437a1c8.tar.gz eclipse.platform.swt-cf0ef481d38bf3ce2b181b6a518e656c9437a1c8.tar.xz eclipse.platform.swt-cf0ef481d38bf3ce2b181b6a518e656c9437a1c8.zip |
Bug 175870 Eclipse gets SIGSEGV
Diffstat (limited to 'bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/List.java')
-rw-r--r-- | bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/List.java | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/List.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/List.java index 6e74071256..21a5318ad1 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/List.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/List.java @@ -214,6 +214,30 @@ void createHandle (int index) { int vsp = (style & SWT.V_SCROLL) != 0 ? OS.GTK_POLICY_AUTOMATIC : OS.GTK_POLICY_NEVER; OS.gtk_scrolled_window_set_policy (scrolledHandle, hsp, vsp); if ((style & SWT.BORDER) != 0) OS.gtk_scrolled_window_set_shadow_type (scrolledHandle, OS.GTK_SHADOW_ETCHED_IN); + /* + * Bug in GTK. When a treeview is the child of an override shell, + * and if the user has ever invokes the interactive search field, + * and the treeview is disposed on a focus out event, it segment + * faults. The fix is to disable the search field in an override + * shell. + */ + if ((getShell ().style & SWT.ON_TOP) != 0) { + /* + * Bug in GTK. Until GTK 2.6.5, calling gtk_tree_view_set_enable_search(FALSE) + * would prevent the user from being able to type in text to search the tree. + * After 2.6.5, GTK introduced Ctrl+F as being the key binding for interactive + * search. This meant that even if FALSE was passed to enable_search, the user + * can still bring up the search pop up using the keybinding. GTK also introduced + * the notion of passing a -1 to gtk_set_search_column to disable searching + * (including the search key binding). The fix is to use the right calls + * for the right version. + */ + if (OS.GTK_VERSION >= OS.VERSION (2, 6, 5)) { + OS.gtk_tree_view_set_search_column (handle, -1); + } else { + OS.gtk_tree_view_set_enable_search (handle, false); + } + } } public Point computeSize (int wHint, int hHint, boolean changed) { |