Debug added to inform about skipping object with negative highlight index
authorPatryk Kaczmarek <patryk.k@samsung.com>
Wed, 17 Jun 2015 09:21:05 +0000 (11:21 +0200)
committerPatryk Kaczmarek <patryk.k@samsung.com>
Thu, 18 Jun 2015 15:56:32 +0000 (00:56 +0900)
Change-Id: If1397bbab53c673c44265220f42d196be9e8fff3
Signed-off-by: Patryk Kaczmarek <patryk.k@samsung.com>
src/position_sort.c

index 5f0a0c8..cb9e7f1 100644 (file)
@@ -97,13 +97,21 @@ _get_rest(const Eina_List *objs)
    const Eina_List *l;
    AtspiAccessible *obj;
    AtspiComponent *comp;
+   int index = 0;
 
    EINA_LIST_FOREACH(objs, l, obj)
    {
       if ((comp = atspi_accessible_get_component_iface(obj)) != NULL)
          {
-            if (atspi_component_get_highlight_index(comp, NULL) == 0)
+            index = atspi_component_get_highlight_index(comp, NULL);
+            if (index == 0)
                candidates = eina_list_append(candidates, obj);
+            else if (index < 0)
+               {
+                  DEBUG("Element [%s] [%s] has negative highlight index, will be skipped",
+                        atspi_accessible_get_name(obj, NULL),
+                        atspi_accessible_get_role_name(obj, NULL));
+               }
          }
       else
          DEBUG("No component interface: skipping %s %s",