[gtk/wip/carlosg/fix-search-entry: 3/4] gtksearchbar: Do not handle captured events for unmapped bars



commit 0350885cfd8e165110e4757e2dc267fb1450fee5
Author: Carlos Garnacho <carlosg gnome org>
Date:   Mon Feb 18 20:00:19 2019 +0100

    gtksearchbar: Do not handle captured events for unmapped bars

 gtk/gtksearchbar.c | 3 +++
 1 file changed, 3 insertions(+)
---
diff --git a/gtk/gtksearchbar.c b/gtk/gtksearchbar.c
index 1b81c8c8e9..af346d1de8 100644
--- a/gtk/gtksearchbar.c
+++ b/gtk/gtksearchbar.c
@@ -641,6 +641,9 @@ capture_widget_key_handled (GtkEventControllerKey *controller,
   GtkSearchBarPrivate *priv = gtk_search_bar_get_instance_private (bar);
   gboolean handled;
 
+  if (!gtk_widget_get_mapped (GTK_WIDGET (bar)))
+    return GDK_EVENT_PROPAGATE;
+
   if (priv->reveal_child)
     return GDK_EVENT_PROPAGATE;
 


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