Problem with combobox on gtk+ and directfb



Hello!

I observe the following problem on gtk+ running on directfb. It seems to
be directfb related, since it does not occur with the x11 backend.

My system:

gentoo linux
kernel 2.6.20.7
glibc-2.5
gcc-4.1.1

directfb-1.0
gtk+-2.10.11

and

xorg-x11-7.1
gtk+-2.10.9

For the directfb version I've modified two gtk+ Makefiles as described here:
http://mail.gnome.org/archives/gtk-devel-list/2006-September/msg00046.html
Without this, gtk+ will not compile with the directfb backend. However, I 
don't think this has an influence on the observed bug (but who knows...)

Well, and here it is: I have a simple gtk+ application showing a combobox that
holds two strings. I click on the combobox, it pops up, I keep the mouse 
button pressed, and now when i press any key on the keyboard, the
application crashes with a segfault.

You find the program attached to this mail.

Is this reproducible anywhere?

Best regards,
Christian Schaubschlaeger

#include <gtk/gtk.h>

int main (int argc, char **argv)
{
  GtkWidget *dialog1;
  GtkWidget *dialog_vbox1;
  GtkWidget *combobox1;
  GtkWidget *dialog_action_area1;
  GtkWidget *okbutton1;

  gchar list_entry[32];
  
  gtk_init (&argc, &argv);

  dialog1 = gtk_dialog_new ();
  gtk_window_set_title (GTK_WINDOW (dialog1), "dialog1");
  gtk_window_set_position (GTK_WINDOW (dialog1), GTK_WIN_POS_CENTER_ALWAYS);
  gtk_window_set_type_hint (GTK_WINDOW (dialog1), GDK_WINDOW_TYPE_HINT_DIALOG);

  dialog_vbox1 = GTK_DIALOG (dialog1)->vbox;
  gtk_widget_show (dialog_vbox1);

  combobox1 = gtk_combo_box_new_text ();
  gtk_widget_show (combobox1);
  gtk_box_pack_start (GTK_BOX (dialog_vbox1), combobox1, TRUE, TRUE, 0);

  dialog_action_area1 = GTK_DIALOG (dialog1)->action_area;
  gtk_widget_show (dialog_action_area1);
  gtk_button_box_set_layout (GTK_BUTTON_BOX (dialog_action_area1), GTK_BUTTONBOX_END);

  okbutton1 = gtk_button_new_from_stock ("gtk-ok");
  gtk_widget_show (okbutton1);
  gtk_dialog_add_action_widget (GTK_DIALOG (dialog1), okbutton1, GTK_RESPONSE_OK);
  GTK_WIDGET_SET_FLAGS (okbutton1, GTK_CAN_DEFAULT);

  g_signal_connect ((gpointer) okbutton1, "clicked",
					 G_CALLBACK (gtk_main_quit),
					 NULL);
 
  /* Insert two test strings in the combobox */
  sprintf(list_entry,"Test_String1");
  gtk_combo_box_insert_text(GTK_COMBO_BOX(combobox1),0,list_entry);
 
  sprintf(list_entry,"Test_String2");
  gtk_combo_box_insert_text(GTK_COMBO_BOX(combobox1),1,list_entry);

  gtk_widget_show (dialog1);

  gtk_main ();
  return 0;
}



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]