[gtk+] widget: fix GtkLabelAccessible NULL links.
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] widget: fix GtkLabelAccessible NULL links.
- Date: Sun, 15 May 2016 14:28:15 +0000 (UTC)
commit cd305c19702cc80f900a0922bce19bf0c926167a
Author: Alban Browaeys <prahal yahoo com>
Date: Sat May 14 23:57:28 2016 +0200
widget: fix GtkLabelAccessible NULL links.
Fix testsuite/a11y/about.ui GtkAboutDialog :
"CRITICAL **: atk_hyperlink_get_start_index: assertion 'ATK_IS_HYPERLINK (link)' failed"
That is set widget->priv->accessible as soon as accessible object is generated.
When accessible object is created accessible->priv->widget is set,
if widget->priv->accessible is not , then _gtk_label_accessible_update_links
exits early, thus without creating the links on the accessible side.
(This as it checks for the widget to have the accessible set before proceeding).
https://bugzilla.gnome.org/show_bug.cgi?id=766458
gtk/gtkwidget.c | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
---
diff --git a/gtk/gtkwidget.c b/gtk/gtkwidget.c
index c14e127..36752b4 100644
--- a/gtk/gtkwidget.c
+++ b/gtk/gtkwidget.c
@@ -13417,6 +13417,8 @@ gtk_widget_real_get_accessible (GtkWidget *widget)
if (priv->accessible_role != ATK_ROLE_INVALID)
atk_object_set_role (accessible, priv->accessible_role);
+
+ widget->priv->accessible = accessible;
}
else
{
@@ -13426,6 +13428,8 @@ gtk_widget_real_get_accessible (GtkWidget *widget)
if (priv->accessible_role != ATK_ROLE_INVALID)
atk_object_set_role (accessible, priv->accessible_role);
+ widget->priv->accessible = accessible;
+
atk_object_initialize (accessible, widget);
/* Set the role again, since we don't want a role set
@@ -13436,7 +13440,6 @@ gtk_widget_real_get_accessible (GtkWidget *widget)
atk_object_set_role (accessible, priv->accessible_role);
}
- widget->priv->accessible = accessible;
}
return accessible;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]