From df1e2cd128782c49f0cf0b6dbe6729edfce72be3 Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Fri, 14 Oct 2011 15:52:24 -0400 Subject: [PATCH] Fix more test breakage --- gtk/gtkwidget.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/gtk/gtkwidget.c b/gtk/gtkwidget.c index 8bc8c07836..afe982a25f 100644 --- a/gtk/gtkwidget.c +++ b/gtk/gtkwidget.c @@ -12099,7 +12099,6 @@ gtk_widget_real_get_accessible (GtkWidget *widget) else { accessible = g_object_new (priv->accessible_type, NULL); - if (priv->accessible_role != ATK_ROLE_INVALID) atk_object_set_role (accessible, priv->accessible_role); @@ -12108,6 +12107,13 @@ gtk_widget_real_get_accessible (GtkWidget *widget) accessible); atk_object_initialize (accessible, widget); + + /* Set the role again, since we don't want a role set + * in some parent initialize() function to override + * our own. + */ + if (priv->accessible_role != ATK_ROLE_INVALID) + atk_object_set_role (accessible, priv->accessible_role); } } return accessible;