[gtk/fix-entry-completion: 4/4] entry completion: Make keynav work again
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/fix-entry-completion: 4/4] entry completion: Make keynav work again
- Date: Mon, 22 Jun 2020 16:51:32 +0000 (UTC)
commit 53a30eaa12e44a2ee5da7c9bc9a23a8bfeb733dc
Author: Matthias Clasen <mclasen redhat com>
Date: Mon Jun 22 12:48:42 2020 -0400
entry completion: Make keynav work again
Use gtk_widget_prepend_controller to supersede entry keynav
while the popup is open. This fixes selecting completions
with the keyboard - the Enter keypress was ending up
triggering GtkText::activate instead of inserting the
selected completion into the entry.
gtk/gtkentrycompletion.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/gtk/gtkentrycompletion.c b/gtk/gtkentrycompletion.c
index 8fdc9d0739..d2f849a213 100644
--- a/gtk/gtkentrycompletion.c
+++ b/gtk/gtkentrycompletion.c
@@ -2338,7 +2338,7 @@ connect_completion_signals (GtkEntryCompletion *completion)
gtk_event_controller_set_name (controller, "gtk-entry-completion");
g_signal_connect (controller, "key-pressed",
G_CALLBACK (gtk_entry_completion_key_pressed), completion);
- gtk_widget_add_controller (GTK_WIDGET (text), controller);
+ gtk_widget_prepend_controller (GTK_WIDGET (text), controller);
controller = priv->entry_focus_controller = gtk_event_controller_focus_new ();
gtk_event_controller_set_name (controller, "gtk-entry-completion");
g_signal_connect_swapped (controller, "leave", G_CALLBACK (text_focus_out), completion);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]