summaryrefslogtreecommitdiffstats
path: root/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/ToolBar.java
diff options
context:
space:
mode:
Diffstat (limited to 'bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/ToolBar.java')
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/ToolBar.java7
1 files changed, 7 insertions, 0 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/ToolBar.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/ToolBar.java
index 821beed3b0..0ba8e94db7 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/ToolBar.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/ToolBar.java
@@ -138,6 +138,13 @@ void createHandle (int index) {
byte [] swt_toolbar_flat = Converter.wcsToMbcs (null, "swt-toolbar-flat", true);
OS.gtk_widget_set_name (handle, swt_toolbar_flat);
}
+ /*
+ * Bug in GTK. GTK will segment fault if gtk_widget_reparent() is called
+ * on a toolbar or on a widget hierarchy containing a toolbar when the icon
+ * size is not GTK_ICON_SIZE_LARGE_TOOLBAR. The fix is to set the icon
+ * size to GTK_ICON_SIZE_LARGE_TOOLBAR.
+ */
+ OS.gtk_toolbar_set_icon_size (handle, OS.GTK_ICON_SIZE_LARGE_TOOLBAR);
}
public Point computeSize (int wHint, int hHint, boolean changed) {