mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-11-14 12:41:07 +00:00
Merge branch 'fallback-menu-critical' into 'master'
popovermenu: Avoid a critical Closes #2998 See merge request GNOME/gtk!2343
This commit is contained in:
commit
638ea2d6fc
@ -228,7 +228,14 @@ static void
|
||||
focus_out (GtkEventController *controller,
|
||||
GtkPopoverMenu *menu)
|
||||
{
|
||||
GtkWidget *new_focus = gtk_root_get_focus (gtk_widget_get_root (GTK_WIDGET (menu)));
|
||||
GtkRoot *root;
|
||||
GtkWidget *new_focus;
|
||||
|
||||
root = gtk_widget_get_root (GTK_WIDGET (menu));
|
||||
if (!root)
|
||||
return;
|
||||
|
||||
new_focus = gtk_root_get_focus (root);
|
||||
|
||||
if (!gtk_event_controller_focus_contains_focus (GTK_EVENT_CONTROLLER_FOCUS (controller)) &&
|
||||
new_focus != NULL)
|
||||
|
Loading…
Reference in New Issue
Block a user