From 120ee17e095190db9192a91065433f2945ebe2e8 Mon Sep 17 00:00:00 2001 From: Carlos Garnacho Date: Mon, 18 Feb 2019 20:00:19 +0100 Subject: [PATCH] gtksearchbar: Do not handle captured events for unmapped bars If the bar is currently unmapped, it should not attempt to capture and handle events. Related: https://gitlab.gnome.org/GNOME/gtk/issues/1205 --- gtk/gtksearchbar.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/gtk/gtksearchbar.c b/gtk/gtksearchbar.c index 0b3f916344..7c0222ef60 100644 --- a/gtk/gtksearchbar.c +++ b/gtk/gtksearchbar.c @@ -643,6 +643,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;