[nautilus/wip/ernestask/rolling-around-at-the-speed-of-diagonal: 2/3] location-entry: Chain up to parent ::event handler
- From: Ernestas Kulik <ernestask src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [nautilus/wip/ernestask/rolling-around-at-the-speed-of-diagonal: 2/3] location-entry: Chain up to parent ::event handler
- Date: Fri, 30 Nov 2018 13:52:26 +0000 (UTC)
commit 63df2159ef8a130f64072d9de3cc65c1ddc8601f
Author: Ernestas Kulik <ekulik redhat com>
Date: Fri Nov 30 14:49:53 2018 +0100
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 https://gitlab.gnome.org/GNOME/nautilus/issues/768
src/nautilus-location-entry.c | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
---
diff --git a/src/nautilus-location-entry.c b/src/nautilus-location-entry.c
index ac7379159..43fb4c6fc 100644
--- a/src/nautilus-location-entry.c
+++ b/src/nautilus-location-entry.c
@@ -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.
*
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]