widgetfocus: Remove unnecessary check

Mapped widgets are always realized.
This commit is contained in:
Benjamin Otte 2020-02-04 17:33:14 +01:00
parent 3cb150abbe
commit a1635719fc

View File

@ -418,13 +418,12 @@ gtk_widget_focus_sort (GtkWidget *widget,
if (focus_order->len == 0)
{
/* Initialize the list with all realized child widgets */
/* Initialize the list with all visible child widgets */
for (child = _gtk_widget_get_first_child (widget);
child != NULL;
child = _gtk_widget_get_next_sibling (child))
{
if (_gtk_widget_get_realized (child) &&
_gtk_widget_get_mapped (child) &&
if (_gtk_widget_get_mapped (child) &&
gtk_widget_get_sensitive (child))
g_ptr_array_add (focus_order, child);
}