From 4ffe5a495420406de3a5f24c526574ce7c4c4883 Mon Sep 17 00:00:00 2001 From: Samuel Thibault Date: Tue, 21 Apr 2020 01:09:07 +0200 Subject: [PATCH] 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 --- gtk/a11y/gtknotebookpageaccessible.c | 16 ++++------------ 1 file 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 {