[gtk/wip/matthiasc/focus3: 8/32] Exclude non-drawable widgets from focus



commit 150321b5fca9c7130cd4dc58e160e773cdc92885
Author: Matthias Clasen <mclasen redhat com>
Date:   Sat Mar 2 20:32:11 2019 -0500

    Exclude non-drawable widgets from focus
    
    This was showing up as confusion between palette
    and editor in the color chooser.

 gtk/gtkwidgetfocus.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
---
diff --git a/gtk/gtkwidgetfocus.c b/gtk/gtkwidgetfocus.c
index c29adfdbe0..26f7f8ae24 100644
--- a/gtk/gtkwidgetfocus.c
+++ b/gtk/gtkwidgetfocus.c
@@ -422,7 +422,9 @@ gtk_widget_focus_sort (GtkWidget        *widget,
            child != NULL;
            child = _gtk_widget_get_next_sibling (child))
         {
-          if (_gtk_widget_get_realized (child))
+          if (_gtk_widget_get_realized (child) &&
+              _gtk_widget_is_drawable (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]