Commit 43df84f5 authored by Ernestas Kulik's avatar Ernestas Kulik 🦑

location-entry: Chain up to parent ::event handler

Simply propagating the event if it’s not a key press causes the parent
handler to not be invoked and things like activating entry icons will
stop working.

Fixes #768
parent ecc9c957
......@@ -612,18 +612,20 @@ static gboolean
nautilus_location_entry_on_event (GtkWidget *widget,
GdkEvent *event)
{
GtkWidgetClass *parent_widget_class;
NautilusLocationEntry *entry;
NautilusLocationEntryPrivate *priv;
GtkEditable *editable;
gboolean selected;
guint keyval;
GdkModifierType state;
GtkWidgetClass *parent_widget_class;
gboolean handled;
parent_widget_class = GTK_WIDGET_CLASS (nautilus_location_entry_parent_class);
if (gdk_event_get_event_type (event) != GDK_KEY_PRESS)
{
return GDK_EVENT_PROPAGATE;
return parent_widget_class->event (widget, event);
}
entry = NAUTILUS_LOCATION_ENTRY (widget);
......@@ -667,7 +669,6 @@ nautilus_location_entry_on_event (GtkWidget *widget,
set_position_and_selection_to_end (editable);
}
parent_widget_class = GTK_WIDGET_CLASS (nautilus_location_entry_parent_class);
/* GTK+ 4 TODO: Calling the event vfunc is not enough, we need the entry
* to handle the key press and insert the text first.
*
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment