summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAntónio Fernandes <antoniof@gnome.org>2021-08-08 16:14:55 +0100
committerAntónio Fernandes <antoniof@gnome.org>2021-08-16 10:36:46 +0100
commit83b14260d5a1b08743704ddd297e490da06c4388 (patch)
treed0f54fbf1dee5573272d10a76443e05ce448c070 /src
parent455b2f7ba362b28d39362c378faf94200e46a3c2 (diff)
downloadnautilus-83b14260d5a1b08743704ddd297e490da06c4388.tar.gz
window: Drop usage of gtk_window_propagate_key_event
It's going away in GTK4. Also, as we use a key event controller now, we can use gtk_event_controller_key_forward() instead.
Diffstat (limited to 'src')
-rw-r--r--src/nautilus-window.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/src/nautilus-window.c b/src/nautilus-window.c
index c0b68b558..a460d0d86 100644
--- a/src/nautilus-window.c
+++ b/src/nautilus-window.c
@@ -2377,11 +2377,9 @@ nautilus_window_key_capture (GtkEventControllerKey *controller,
GdkModifierType state,
gpointer user_data)
{
- g_autoptr (GdkEvent) event = NULL;
GtkWidget *widget;
GtkWidget *focus_widget;
- event = gtk_get_current_event ();
widget = gtk_event_controller_get_widget (GTK_EVENT_CONTROLLER (controller));
focus_widget = gtk_window_get_focus (GTK_WINDOW (widget));
if (focus_widget != NULL && GTK_IS_EDITABLE (focus_widget))
@@ -2390,8 +2388,7 @@ nautilus_window_key_capture (GtkEventControllerKey *controller,
* the event to it before activating accelerators. This allows, e.g.,
* typing a tilde without activating the prompt-home-location action.
*/
- if (gtk_window_propagate_key_event (GTK_WINDOW (widget),
- (GdkEventKey *) event))
+ if (gtk_event_controller_key_forward (controller, focus_widget))
{
return GDK_EVENT_STOP;
}