mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2025-01-01 16:30:15 +00:00
window: Fix focus wraparound
If tab focus falls off the end, and we have an empty headerbar, we end up with window->focus == NULL. Don't let that happen Close https://gitlab.gnome.org/GNOME/gtk/issues/686#note_529577
This commit is contained in:
parent
b6c9d23b9a
commit
e56a9e6ce5
@ -8625,7 +8625,7 @@ gtk_window_focus (GtkWidget *widget,
|
|||||||
if (old_focus_child)
|
if (old_focus_child)
|
||||||
{
|
{
|
||||||
if (gtk_widget_child_focus (old_focus_child, direction))
|
if (gtk_widget_child_focus (old_focus_child, direction))
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (priv->focus_widget)
|
if (priv->focus_widget)
|
||||||
@ -8668,7 +8668,9 @@ gtk_window_focus (GtkWidget *widget,
|
|||||||
priv->title_box != child &&
|
priv->title_box != child &&
|
||||||
gtk_widget_child_focus (priv->title_box, direction))
|
gtk_widget_child_focus (priv->title_box, direction))
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
else if (priv->title_box == child &&
|
||||||
|
gtk_widget_child_focus (gtk_bin_get_child (bin), direction))
|
||||||
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
Loading…
Reference in New Issue
Block a user