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
This commit is contained in:
Carlos Garnacho 2019-02-18 20:00:19 +01:00
parent 02bb364474
commit 120ee17e09

View File

@ -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;