diff options
author | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2020-04-21 01:09:07 +0200 |
---|---|---|
committer | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2020-12-05 00:34:32 +0100 |
commit | 4ffe5a495420406de3a5f24c526574ce7c4c4883 (patch) | |
tree | 002822b826b95f1f234464cbd24b4e260083ad5a | |
parent | 850a086adb50fa02989d412a873e0e590b73b804 (diff) | |
download | gtk+-4ffe5a495420406de3a5f24c526574ce7c4c4883.tar.gz |
gtknotebookpageaccessible: do not fallback to child accessible for extents
When the notebook page does not have a label, it should not fallback to
asking its child accessible for extent, since the child might be asking
exactly the converse when it is a socket, thus getting in an infinite
loop. When the page does not have a label, is does not really make sense to
give it an extent anyway.
Fixes atk#18
-rw-r--r-- | gtk/a11y/gtknotebookpageaccessible.c | 16 |
1 files changed, 4 insertions, 12 deletions
diff --git a/gtk/a11y/gtknotebookpageaccessible.c b/gtk/a11y/gtknotebookpageaccessible.c index 0f57c737b8..0fb6920604 100644 --- a/gtk/a11y/gtknotebookpageaccessible.c +++ b/gtk/a11y/gtknotebookpageaccessible.c @@ -311,18 +311,10 @@ gtk_notebook_page_accessible_get_extents (AtkComponent *component, label = get_label_from_notebook_page (GTK_NOTEBOOK_PAGE_ACCESSIBLE (component)); if (!label) { - AtkObject *child; - - *width = 0; - *height = 0; - - child = atk_object_ref_accessible_child (ATK_OBJECT (component), 0); - if (!child) - return; - - atk_component_get_extents (ATK_COMPONENT (child), x, y, NULL, NULL, - coord_type); - g_object_unref (child); + *x = -1; + *y = -1; + *width = -1; + *height = -1; } else { |