Eina_Bool ret = EINA_TRUE;
AtspiAccessible *obj = fdata;
+ AtspiAccessible *parent = atspi_accessible_get_parent(obj, NULL);
+ AtspiStateSet *ss_parent = NULL;
+ AtspiStateSet *ss = NULL;
- AtspiStateSet *ss = atspi_accessible_get_state_set(obj);
-
- if (atspi_accessible_get_role(obj, NULL) == ATSPI_ROLE_LIST_ITEM)
- return EINA_TRUE;
+ if (parent)
+ {
+ if (atspi_accessible_get_role(obj, NULL) == ATSPI_ROLE_LIST_ITEM)
+ {
+ ss_parent = atspi_accessible_get_state_set(parent);
+ if (ss_parent)
+ {
+ if (atspi_state_set_contains(ss_parent, ATSPI_STATE_SHOWING)
+ && atspi_state_set_contains(ss_parent, ATSPI_STATE_VISIBLE))
+ {
+ g_object_unref(parent);
+ g_object_unref(ss_parent);
+ return EINA_TRUE;
+ }
+ g_object_unref(ss_parent);
+ }
+ }
+ g_object_unref(parent);
+ }
+ ss = atspi_accessible_get_state_set(obj);
while (*state != ATSPI_STATE_LAST_DEFINED)
{
if (!atspi_state_set_contains(ss, *state))
}
state++;
}
-
- g_object_unref(ss);
+ if (ss)
+ g_object_unref(ss);
return ret;
}
FlatNaviContext *flat_navi_context_create(AtspiAccessible *root)
{
FlatNaviContext *ret;
-
ret = calloc(1, sizeof(FlatNaviContext));
if (!ret) return NULL;
void flat_navi_context_free(FlatNaviContext *ctx)
{
+ if (!ctx) return;
Eina_List *l;
EINA_LIST_FREE(ctx->lines, l)
{