[gtk/wip/otte/for-master: 2/2] widgetfocus: Remove unnecessary check



commit 48b78b518401d9bf51e815e3a6bec915fa86e89f
Author: Benjamin Otte <otte redhat com>
Date:   Tue Feb 4 17:33:14 2020 +0100

    widgetfocus: Remove unnecessary check
    
    Mapped widgets are always realized.

 gtk/gtkwidgetfocus.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)
---
diff --git a/gtk/gtkwidgetfocus.c b/gtk/gtkwidgetfocus.c
index 921b72527d..b4f793dfeb 100644
--- a/gtk/gtkwidgetfocus.c
+++ b/gtk/gtkwidgetfocus.c
@@ -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);
         }


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]