Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSilenio Quarti2012-08-29 13:42:34 +0000
committerBogdan Gheorghe2013-01-15 20:58:44 +0000
commit8a5c889e981e7341df91a7960d72e607d072992a (patch)
tree4cbaed69159e3b5b035b0e30716646a7d822f8b3
parent8f3dc142dea99aa3a2479caf5485364c2c95414d (diff)
downloadeclipse.platform.swt-8a5c889e981e7341df91a7960d72e607d072992a.tar.gz
eclipse.platform.swt-8a5c889e981e7341df91a7960d72e607d072992a.tar.xz
eclipse.platform.swt-8a5c889e981e7341df91a7960d72e607d072992a.zip
Bug 387496 - JVM crashes when running jdtuirefactoring tests on hudson: im-xim.so+0x3b04
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os.c10
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os_stats.c7
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os_stats.h1
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/OS.java11
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/ToolBar.java7
5 files changed, 33 insertions, 3 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os.c b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os.c
index 58fe0dabdf..a3085a1e6e 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os.c
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os.c
@@ -14640,6 +14640,16 @@ JNIEXPORT jintLong JNICALL OS_NATIVE(_1gtk_1toolbar_1new)
}
#endif
+#ifndef NO__1gtk_1toolbar_1set_1icon_1size
+JNIEXPORT void JNICALL OS_NATIVE(_1gtk_1toolbar_1set_1icon_1size)
+ (JNIEnv *env, jclass that, jintLong arg0, jint arg1)
+{
+ OS_NATIVE_ENTER(env, that, _1gtk_1toolbar_1set_1icon_1size_FUNC);
+ gtk_toolbar_set_icon_size((GtkToolbar *)arg0, arg1);
+ OS_NATIVE_EXIT(env, that, _1gtk_1toolbar_1set_1icon_1size_FUNC);
+}
+#endif
+
#ifndef NO__1gtk_1toolbar_1set_1orientation
JNIEXPORT void JNICALL OS_NATIVE(_1gtk_1toolbar_1set_1orientation)
(JNIEnv *env, jclass that, jintLong arg0, jint arg1)
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os_stats.c b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os_stats.c
index b6e769d9f5..0e1a60c770 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os_stats.c
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os_stats.c
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2012 IBM Corporation and others. All rights reserved.
+ * Copyright (c) 2000, 2013 IBM Corporation and others. All rights reserved.
* The contents of this file are made available under the terms
* of the GNU Lesser General Public License (LGPL) Version 2.1 that
* accompanies this distribution (lgpl-v21.txt). The LGPL is also
@@ -18,8 +18,8 @@
#ifdef NATIVE_STATS
-int OS_nativeFunctionCount = 1403;
-int OS_nativeFunctionCallCount[1403];
+int OS_nativeFunctionCount = 1404;
+int OS_nativeFunctionCallCount[1404];
char * OS_nativeFunctionNames[] = {
#ifndef JNI64
"Call__IIII",
@@ -1124,6 +1124,7 @@ char * OS_nativeFunctionNames[] = {
"_1gtk_1toolbar_1insert",
"_1gtk_1toolbar_1insert_1widget",
"_1gtk_1toolbar_1new",
+ "_1gtk_1toolbar_1set_1icon_1size",
"_1gtk_1toolbar_1set_1orientation",
"_1gtk_1toolbar_1set_1show_1arrow",
"_1gtk_1toolbar_1set_1style",
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os_stats.h b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os_stats.h
index ad1e9e1635..914537b83e 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os_stats.h
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os_stats.h
@@ -1132,6 +1132,7 @@ typedef enum {
_1gtk_1toolbar_1insert_FUNC,
_1gtk_1toolbar_1insert_1widget_FUNC,
_1gtk_1toolbar_1new_FUNC,
+ _1gtk_1toolbar_1set_1icon_1size_FUNC,
_1gtk_1toolbar_1set_1orientation_FUNC,
_1gtk_1toolbar_1set_1show_1arrow_FUNC,
_1gtk_1toolbar_1set_1style_FUNC,
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/OS.java b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/OS.java
index 44b9068e11..d15c29fd0a 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/OS.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/OS.java
@@ -11403,6 +11403,17 @@ public static final void gtk_toolbar_set_style(int /*long*/ toolbar, int style)
lock.unlock();
}
}
+/** @param toolbar cast=(GtkToolbar *)
+ */
+public static final native void _gtk_toolbar_set_icon_size(int /*long*/ toolbar, int size);
+public static final void gtk_toolbar_set_icon_size(int /*long*/ toolbar, int size) {
+ lock.lock();
+ try {
+ _gtk_toolbar_set_icon_size(toolbar, size);
+ } finally {
+ lock.unlock();
+ }
+}
/** @method flags=dynamic */
public static final native int /*long*/ _gtk_tooltips_data_get(int /*long*/ widget);
public static final int /*long*/ gtk_tooltips_data_get(int /*long*/ widget) {
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 a4d939d1aa..2c77f9d4aa 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) {

Back to the top