searchentry: Fix keynav

Shift-Tabbing was getting stuck in GtkSearchEntry and
GtkPasswordEntry, since they grab the focus to a child
of theirs. Copy the same fix that we are already using
in GtkEntry.

Fixes: #2842
This commit is contained in:
Matthias Clasen 2020-06-15 13:45:57 -04:00
parent 937317e674
commit c175a7a470
2 changed files with 3 additions and 0 deletions

View File

@ -378,6 +378,7 @@ gtk_password_entry_class_init (GtkPasswordEntryClass *klass)
widget_class->size_allocate = gtk_password_entry_size_allocate;
widget_class->mnemonic_activate = gtk_password_entry_mnemonic_activate;
widget_class->grab_focus = gtk_widget_grab_focus_child;
widget_class->focus = gtk_widget_focus_child;
props[PROP_PLACEHOLDER_TEXT] =
g_param_spec_string ("placeholder-text",

View File

@ -40,6 +40,7 @@
#include "gtkmarshalers.h"
#include "gtkstylecontext.h"
#include "gtkeventcontrollerkey.h"
#include "gtkwidgetprivate.h"
#include "a11y/gtksearchentryaccessible.h"
@ -249,6 +250,7 @@ gtk_search_entry_class_init (GtkSearchEntryClass *klass)
object_class->set_property = gtk_search_entry_set_property;
widget_class->grab_focus = gtk_search_entry_grab_focus;
widget_class->focus = gtk_widget_focus_child;
widget_class->mnemonic_activate = gtk_search_entry_mnemonic_activate;
klass->stop_search = gtk_search_entry_stop_search;