[gnome-photos/gnome-3-20] searchbar: Only use ENTER events when active



commit abf9252cd98ef6a069d426de45f8c468308ef504
Author: Alessandro Bono <abono gnome org>
Date:   Tue Jun 28 18:48:55 2016 +0200

    searchbar: Only use ENTER events when active
    
    We don't want to risk activating random stuff while the searchbar is
    not up.
    
    Original patch from Cosimo Cecchi for gnome-documents.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=768130

 src/photos-searchbar.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/src/photos-searchbar.c b/src/photos-searchbar.c
index b9bbdcf..e455908 100644
--- a/src/photos-searchbar.c
+++ b/src/photos-searchbar.c
@@ -313,7 +313,7 @@ photos_searchbar_handle_event (PhotosSearchbar *self, GdkEventKey *event)
       ret_val = GDK_EVENT_STOP;
       goto out;
     }
-  else if (event->keyval == GDK_KEY_Return)
+  else if (priv->in && event->keyval == GDK_KEY_Return)
     {
       g_signal_emit (self, signals[ACTIVATE_RESULT], 0);
       ret_val = GDK_EVENT_STOP;


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