GNOME Bugzilla – Bug 424656
GTKComboBoxEntry does not respond to arrow keys when focus is in text field
Last modified: 2017-08-22 11:37:07 UTC
Please describe the problem: In GTK2.6.10, GTKComboBoxEntry allows the user to scroll up and down the list when the focus is in the text field by using the arrow keys. In GTK 2.8.20 and GTK 2.10.6, GTKComboBoxEntry *does not* allow the user to scroll with the arrow keys unless the focus is on the arrow button. Note that the combo box is being created with gtk_combo_box_entry_new_text(). Steps to reproduce: Here is a simple snippet program that creates a combo box and populates it with three items. #include <gtk/gtk.h> int main (int argc, char** argv) { GtkWidget *shellHandle, *comboHandle; gtk_init_check (&argc, &argv); shellHandle = gtk_window_new (GTK_WINDOW_TOPLEVEL); comboHandle = gtk_combo_box_new();//gtk_combo_box_entry_new_text(); gtk_combo_box_append_text(GTK_COMBO_BOX(comboHandle), "aaaaa"); gtk_combo_box_append_text(GTK_COMBO_BOX(comboHandle), "bbbbb"); gtk_combo_box_append_text(GTK_COMBO_BOX(comboHandle), "ccccc"); gtk_container_add (GTK_CONTAINER (shellHandle), comboHandle); g_signal_connect (G_OBJECT (shellHandle), "destroy", G_CALLBACK (gtk_main_quit), NULL); g_signal_connect (G_OBJECT (shellHandle), "delete_event",G_CALLBACK (gtk_main_quit), NULL); gtk_window_move (GTK_WINDOW(shellHandle), 200, 200); gtk_widget_show_all (shellHandle); gtk_main(); return 0; } Actual results: Run the program, set focus to the text field and hit the up and down arrow keys. Notice that none of the list items are selected. Set focus to the arrow button. Hit the up and down arrow keys, notice how list items are selected. Expected results: I would expect to be able to select entries in a combo list while still in the text field by using the up/down arrow keys. Does this happen every time? Yes Other information:
Works for me on GTK+ 2.24, with some required fixes to the test case.