forked from AuroraMiddleware/gtk
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.
This commit is contained in:
parent
692cc42e10
commit
53a30eaa12
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user