widgetfocus: Remove unnecessary check
authorBenjamin Otte <otte@redhat.com>
Tue, 4 Feb 2020 16:33:14 +0000 (17:33 +0100)
committerBenjamin Otte <otte@redhat.com>
Tue, 4 Feb 2020 16:51:01 +0000 (17:51 +0100)
Mapped widgets are always realized.

gtk/gtkwidgetfocus.c

index 921b72527df6294353b8d443d7f6f83734e26127..b4f793dfeb781d57806fb6d8ab38af8fdb8bdeb6 100644 (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);
         }