Commit 2b0ae4ba authored by Matthias Clasen's avatar Matthias Clasen

GtkPopover: Properly update a11y parent

When the relative-to widget changes, update the accessible parent
of the popovers accessible.

https://bugzilla.gnome.org/show_bug.cgi?id=733923
parent f2e806a3
......@@ -61,6 +61,13 @@ popover_update_relative_to (AtkObject *obj,
if (widget)
{
AtkObject *parent;
parent = gtk_widget_get_accessible (widget);
if (parent)
atk_object_set_parent (obj, parent);
g_object_add_weak_pointer (G_OBJECT (priv->widget),
(gpointer*) &priv->widget);
widget_accessible = gtk_widget_get_accessible (widget);
......@@ -97,18 +104,10 @@ static void
gtk_popover_accessible_initialize (AtkObject *obj,
gpointer data)
{
GtkPopover *popover;
AtkObject *parent;
GtkPopover *popover = GTK_POPOVER (data);
ATK_OBJECT_CLASS (gtk_popover_accessible_parent_class)->initialize (obj, data);
popover = GTK_POPOVER (data);
parent = gtk_widget_get_accessible (gtk_popover_get_relative_to (popover));
if (parent)
atk_object_set_parent (obj, parent);
g_signal_connect (popover, "notify",
G_CALLBACK (popover_notify_cb), obj);
popover_update_relative_to (obj, popover);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment