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
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user