[flat_navi] The highlight candidate object can have 0 height (or width) extent.
authorShinwoo Kim <cinoo.kim@samsung.com>
Mon, 14 Sep 2015 11:25:16 +0000 (20:25 +0900)
committerTomasz Olszak <t.olszak@samsung.com>
Fri, 18 Sep 2015 08:43:20 +0000 (10:43 +0200)
Check 1 finger swipe on the "Settings > Display"

Change-Id: Ifa2fd5855229caf916b019024635b537c186d732

src/flat_navi.c

index 9d7cc76..f2dc687 100644 (file)
@@ -160,6 +160,8 @@ static Eina_Bool _accept_object(AtspiAccessible * obj)
        AtspiText *text = NULL;
        AtspiValue *value = NULL;
        AtspiStateSet *ss = NULL;
+       AtspiComponent *component;
+       AtspiRect *extent;
 
        AtspiRole r = atspi_accessible_get_role(obj, NULL);
 
@@ -192,6 +194,17 @@ static Eina_Bool _accept_object(AtspiAccessible * obj)
                return EINA_FALSE;
        }
 
+       /* Extent of candidate object could be 0 */
+       component = atspi_accessible_get_component_iface(obj);
+       extent = atspi_component_get_extents(component, ATSPI_COORD_TYPE_SCREEN, NULL);
+
+       if (extent->width <= 0 || extent->height <= 0) ret = EINA_FALSE;
+
+       g_free(extent);
+
+       if (!ret)
+               return ret;
+
        ss = atspi_accessible_get_state_set(obj);
        if (ss) {
                if (_object_is_item(obj)) {