mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-11-17 23:10:22 +00:00
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
This commit is contained in:
parent
f2e806a36e
commit
2b0ae4bad3
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user