mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-11-15 05:00:09 +00:00
text widgets: Don't lose focus after Emoji
Make sure to grab focus back when the Emoji chooser disappears. This prevents focus going nowhere when the Emoji chooser is canceled. Fixes: #3112
This commit is contained in:
parent
9512e461d5
commit
d5121af876
@ -6825,6 +6825,7 @@ gtk_text_insert_emoji (GtkText *self)
|
||||
|
||||
gtk_widget_set_parent (chooser, GTK_WIDGET (self));
|
||||
g_signal_connect (chooser, "emoji-picked", G_CALLBACK (emoji_picked), self);
|
||||
g_signal_connect_swapped (chooser, "hide", G_CALLBACK (gtk_widget_grab_focus), self);
|
||||
}
|
||||
|
||||
gtk_popover_popup (GTK_POPOVER (chooser));
|
||||
|
@ -9637,6 +9637,7 @@ gtk_text_view_insert_emoji (GtkTextView *text_view)
|
||||
|
||||
gtk_widget_set_parent (chooser, GTK_WIDGET (text_view));
|
||||
g_signal_connect (chooser, "emoji-picked", G_CALLBACK (emoji_picked), text_view);
|
||||
g_signal_connect_swapped (chooser, "hide", G_CALLBACK (gtk_widget_grab_focus), text_view);
|
||||
}
|
||||
|
||||
buffer = get_buffer (text_view);
|
||||
|
Loading…
Reference in New Issue
Block a user