emojichooser: Grab focus on map

This is the right thing to do, since we have a visible
entry and want text input to go there.
This commit is contained in:
Matthias Clasen 2020-08-24 18:31:08 -04:00
parent fd7d61887c
commit 66e0f8505e

View File

@ -999,6 +999,16 @@ keynav_failed (GtkWidget *box,
return FALSE;
}
static void
gtk_emoji_chooser_map (GtkWidget *widget)
{
GtkEmojiChooser *chooser = GTK_EMOJI_CHOOSER (widget);
GTK_WIDGET_CLASS (gtk_emoji_chooser_parent_class)->map (widget);
gtk_widget_grab_focus (chooser->search_entry);
}
static void
gtk_emoji_chooser_class_init (GtkEmojiChooserClass *klass)
{
@ -1007,6 +1017,7 @@ gtk_emoji_chooser_class_init (GtkEmojiChooserClass *klass)
object_class->finalize = gtk_emoji_chooser_finalize;
widget_class->show = gtk_emoji_chooser_show;
widget_class->map = gtk_emoji_chooser_map;
/**
* GtkEmojiChooser::emoji-picked: