GNOME Bugzilla – Bug 169534
Shift-F10 on a GtkTreeView shows a context menu from the typeahead window
Last modified: 2011-02-04 16:17:41 UTC
GTK+ 2.6.2 Run the following test case. If you press "Shift-F10" in the tree view, the context menu for the typeahead window appears in the bottom right corner of the desktop. Even worse, if the tree view has its own context menu (for example, the tree views in Eclipse), both context menus appear. int main (int argc, char **argv) { GtkWidget *window; GtkTreeStore *store; GtkCellRenderer *renderer; GtkTreeViewColumn *column; GtkWidget *tree; int i; gtk_init (&argc, &argv); window = gtk_window_new (GTK_WINDOW_TOPLEVEL); g_signal_connect (G_OBJECT (window), "destroy", G_CALLBACK (gtk_main_quit), 0); g_signal_connect (G_OBJECT (window), "delete_event", G_CALLBACK (gtk_main_quit), 0); store = gtk_tree_store_new (1, G_TYPE_STRING); tree = gtk_tree_view_new_with_model (GTK_TREE_MODEL (store)); renderer = gtk_cell_renderer_text_new (); column = gtk_tree_view_column_new_with_attributes ("Column", renderer, "text", 0, 0); gtk_tree_view_append_column (GTK_TREE_VIEW (tree), column); gtk_container_add (GTK_CONTAINER (window), tree); for(i = 0; i < 10; i++) { GtkTreeIter iter; gtk_tree_store_append (store, &iter, 0); gtk_tree_store_set (store, &iter, 0, "Please press Shift-F10", -1); } gtk_widget_show_all (window); gtk_main (); return 0; }
2005-03-28 Matthias Clasen <mclasen@redhat.com> * gtk/gtktreeview.c (gtk_tree_view_key_press): Don't pop up the context menu of the search entry if it is not visible. (#169534, Billy Biggs)