changeset 1131:c466ef3f1ea0

6804221: Three tests for JTabbedPane produce VM crash on rhel3 Reviewed-by: stayer, campbell
author peterz
date Tue, 24 Feb 2009 19:17:51 +0300
parents 6b77fbb7e33e
children 02b64d5fad60
files src/solaris/native/sun/awt/gtk2_interface.c
diffstat 1 files changed, 5 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/src/solaris/native/sun/awt/gtk2_interface.c	Mon Feb 23 11:16:04 2009 -0800
+++ b/src/solaris/native/sun/awt/gtk2_interface.c	Tue Feb 24 19:17:51 2009 +0300
@@ -93,6 +93,7 @@
 /* Static buffer for conversion from java.lang.String to UTF-8 */
 static char convertionBuffer[CONV_BUFFER_SIZE];
 
+static gboolean new_combo = TRUE;
 const char ENV_PREFIX[] = "GTK_MODULES=";
 
 /*******************/
@@ -608,6 +609,7 @@
             dlsym(gtk2_libhandle, "gtk_combo_box_entry_new");
         if (fp_gtk_combo_box_entry_new == NULL) {
             fp_gtk_combo_box_entry_new = dl_symbol("gtk_combo_new");
+            new_combo = FALSE;
         }
 
         fp_gtk_separator_tool_item_new =
@@ -1423,17 +1425,13 @@
             */
             GtkWidget *combo = (*fp_gtk_combo_box_entry_new)();
 
-            if (widget_type == COMBO_BOX_TEXT_FIELD)
-                (*fp_gtk_container_add)((GtkContainer *)combo, result);
-            else
-            {
+            if (new_combo && widget_type == COMBO_BOX_ARROW_BUTTON) {
                 (*fp_gtk_widget_set_parent)(result, combo);
                 ((GtkBin*)combo)->child = result;
+            } else {
+                (*fp_gtk_container_add)((GtkContainer *)combo, result);
             }
-
             (*fp_gtk_container_add)((GtkContainer *)gtk2_fixed, combo);
-            (*fp_gtk_widget_realize)(result);
-            return result;
         }
         else if (widget_type != TOOL_TIP &&
                  widget_type != INTERNAL_FRAME &&