]> Pileus Git - ~andy/gtk/commitdiff
Don't focus unmapped radio buttons
authorOwen Taylor <otaylor@fishsoup.net>
Fri, 18 Sep 2009 20:37:43 +0000 (16:37 -0400)
committerMatthias Clasen <mclasen@redhat.com>
Fri, 18 Sep 2009 20:37:43 +0000 (16:37 -0400)
With Bug 302240, a check was added to avoid keynav to unrealized
radio buttons in the group, but that's not the right check - the
check should be on MAPPED instead, since a widget can be realized
even if it, or a parent, is hidden. Bug 595599

gtk/gtkradiobutton.c

index 0d7277846b031f7dfb4bdebddd6b6b085a680ba5..f07113fe22c6d338c9f4be892a03eb1108b0cfa3 100644 (file)
@@ -486,7 +486,7 @@ gtk_radio_button_focus (GtkWidget         *widget,
            {
              GtkWidget *child = tmp_list->data;
              
-             if (GTK_WIDGET_REALIZED (child) && GTK_WIDGET_IS_SENSITIVE (child))
+             if (GTK_WIDGET_MAPPED (child) && GTK_WIDGET_IS_SENSITIVE (child))
                {
                  new_focus = child;
                  break;
@@ -522,7 +522,7 @@ gtk_radio_button_focus (GtkWidget         *widget,
            {
              GtkWidget *child = tmp_list->data;
              
-             if (GTK_WIDGET_REALIZED (child) && GTK_WIDGET_IS_SENSITIVE (child))
+             if (GTK_WIDGET_MAPPED (child) && GTK_WIDGET_IS_SENSITIVE (child))
                {
                  new_focus = child;
                  break;