[gtk/wip/carlosg/fix-search-entry: 40/43] gtksearchbar: Use search entry private API to show search entry
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/wip/carlosg/fix-search-entry: 40/43] gtksearchbar: Use search entry private API to show search entry
- Date: Tue, 19 Feb 2019 13:06:40 +0000 (UTC)
commit fa4c6b228981fa2463fffb8b120d20986cb3e4cd
Author: Carlos Garnacho <carlosg gnome org>
Date: Mon Feb 18 20:00:06 2019 +0100
gtksearchbar: Use search entry private API to show search entry
We need to ensure the revealer is shown before maybe forwarding the event
on the way to the entry.
gtk/gtksearchbar.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/gtk/gtksearchbar.c b/gtk/gtksearchbar.c
index 0b3f916344..2c7d599287 100644
--- a/gtk/gtksearchbar.c
+++ b/gtk/gtksearchbar.c
@@ -652,6 +652,9 @@ capture_widget_key_handled (GtkEventControllerKey *controller,
return GDK_EVENT_PROPAGATE;
}
+ if (gtk_search_entry_should_trigger (keyval, state))
+ gtk_revealer_set_reveal_child (GTK_REVEALER (priv->revealer), TRUE);
+
if (GTK_IS_SEARCH_ENTRY (priv->entry))
{
/* The search entry was told to listen to events from the search bar, so
@@ -698,9 +701,6 @@ capture_widget_key_handled (GtkEventControllerKey *controller,
handled = GDK_EVENT_STOP;
}
- if (handled == GDK_EVENT_STOP)
- gtk_revealer_set_reveal_child (GTK_REVEALER (priv->revealer), TRUE);
-
return handled;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]