[gtk+] treeview: Don't popup a search dialog for keypresses that close it



commit 63fe6de94db663db991ea51960eef71a11babd72
Author: Benjamin Otte <otte redhat com>
Date:   Thu Mar 13 01:57:29 2014 +0100

    treeview: Don't popup a search dialog for keypresses that close it
    
    That doesn't make sense.
    And it causes issues, because when holding down the tab key, we
    show/hide a lot of windows and cause a lot of map/unmap events that
    stall the event pipeline.

 gtk/gtktreeview.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/gtk/gtktreeview.c b/gtk/gtktreeview.c
index 2776cea..c882495 100644
--- a/gtk/gtktreeview.c
+++ b/gtk/gtktreeview.c
@@ -5918,7 +5918,8 @@ gtk_tree_view_key_press (GtkWidget   *widget,
    * the typeahead find capabilities. */
   if (gtk_widget_has_focus (GTK_WIDGET (tree_view))
       && tree_view->priv->enable_search
-      && !tree_view->priv->search_custom_entry_set)
+      && !tree_view->priv->search_custom_entry_set
+      && !gtk_tree_view_search_key_cancels_search (event->keyval))
     {
       GdkEvent *new_event;
       char *old_text;


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