After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 169534 - Shift-F10 on a GtkTreeView shows a context menu from the typeahead window
Shift-F10 on a GtkTreeView shows a context menu from the typeahead window
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: Widget: Other
2.6.x
Other Linux
: Normal major
: ---
Assigned To: gtk-bugs
gtk-bugs
Depends on:
Blocks:
 
 
Reported: 2005-03-07 22:18 UTC by Billy Biggs
Modified: 2011-02-04 16:17 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Billy Biggs 2005-03-07 22:18:09 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;
}
Comment 1 Matthias Clasen 2005-03-28 06:04:07 UTC
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)