atspi: Use gtk_accessible_should_present

Replace explicit visibility check by this
more general method of determining whether
an accessible should be presented to the
a11y layer.
This commit is contained in:
Matthias Clasen
2020-10-12 16:39:35 -04:00
parent d9adc1b5aa
commit 663934b2dc

View File

@@ -316,7 +316,7 @@ get_index_in_parent (GtkWidget *widget)
child;
child = gtk_widget_get_next_sibling (child))
{
if (!gtk_widget_get_visible (child))
if (!gtk_accessible_should_present (GTK_ACCESSIBLE (child)))
continue;
if (child == widget)
@@ -425,7 +425,7 @@ handle_accessible_method (GDBusConnection *connection,
child;
child = gtk_widget_get_next_sibling (child))
{
if (!gtk_widget_get_visible (child))
if (!gtk_accessible_should_present (GTK_ACCESSIBLE (child)))
continue;
if (real_idx == idx)
@@ -462,7 +462,7 @@ handle_accessible_method (GDBusConnection *connection,
child;
child = gtk_widget_get_next_sibling (child))
{
if (!gtk_widget_get_visible (child))
if (!gtk_accessible_should_present (GTK_ACCESSIBLE (child)))
continue;
GtkATContext *context = gtk_accessible_get_at_context (GTK_ACCESSIBLE (child));
@@ -561,7 +561,7 @@ handle_accessible_get_property (GDBusConnection *connection,
child;
child = gtk_widget_get_next_sibling (child))
{
if (!gtk_widget_get_visible (child))
if (!gtk_accessible_should_present (GTK_ACCESSIBLE (child)))
continue;
n_children++;