[gtk] search entry: Don't propagate handled events
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk] search entry: Don't propagate handled events
- Date: Thu, 10 Sep 2020 02:28:47 +0000 (UTC)
commit d47d0366631013ae2c7cbefc71e0976290d7be20
Author: Matthias Clasen <mclasen redhat com>
Date: Wed Sep 9 22:26:27 2020 -0400
search entry: Don't propagate handled events
When the text says it has handled the event,
trust it. We don't want to emit ::search-started
if the content hasn't changed, but we still
should not propagate e.g. an Insert key press
if it has already toggled overwrite mode in
the text.
Fixes: #2874
gtk/gtksearchentry.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/gtk/gtksearchentry.c b/gtk/gtksearchentry.c
index ece8cc0c28..80304901b6 100644
--- a/gtk/gtksearchentry.c
+++ b/gtk/gtksearchentry.c
@@ -593,9 +593,9 @@ capture_widget_key_handled (GtkEventControllerKey *controller,
handled = gtk_event_controller_key_forward (controller, entry->entry);
- if (handled && entry->content_changed && !entry->search_stopped)
+ if (handled)
{
- if (was_empty)
+ if (was_empty && entry->content_changed && !entry->search_stopped)
g_signal_emit (entry, signals[SEARCH_STARTED], 0);
return GDK_EVENT_STOP;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]