[gnome-builder] search: fix ctrl+tab on search box



commit 4710937fb7bb7ba8e47cf41a735b404631ba71d5
Author: Christian Hergert <christian hergert me>
Date:   Thu Apr 9 15:32:43 2015 -0700

    search: fix ctrl+tab on search box

 src/search/gb-search-box.c |   11 +++++++++--
 1 files changed, 9 insertions(+), 2 deletions(-)
---
diff --git a/src/search/gb-search-box.c b/src/search/gb-search-box.c
index 2789f00..aecfa8f 100644
--- a/src/search/gb-search-box.c
+++ b/src/search/gb-search-box.c
@@ -209,10 +209,17 @@ gb_search_box_entry_key_press_event (GbSearchBox    *self,
 
     case GDK_KEY_Tab:
     case GDK_KEY_KP_Tab:
+      if ((key->state & (GDK_CONTROL_MASK | GDK_MOD1_MASK)) != 0)
+        break;
+      /* Fall through */
     case GDK_KEY_Down:
     case GDK_KEY_KP_Down:
-      gtk_widget_grab_focus (GTK_WIDGET (self->display));
-      return GDK_EVENT_STOP;
+      if (gtk_widget_get_visible (GTK_WIDGET (self->popover)))
+        {
+          gtk_widget_grab_focus (GTK_WIDGET (self->display));
+          return GDK_EVENT_STOP;
+        }
+      break;
 
     default:
       break;


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