EAPI Eo *
elm_widget_top_get(const Eo *obj)
{
- Efl_Ui_Widget *parent = elm_widget_parent_get(obj);
+ Efl_Ui_Widget *parent = NULL;
+
+ if (efl_isa(obj, ELM_WIDGET_ITEM_CLASS))
+ parent = elm_object_item_widget_get(obj);
+ else
+ parent = elm_widget_parent_get(obj);
+
if (parent)
{
if (!efl_isa(parent, EFL_UI_WIDGET_CLASS)) return NULL;
//
typedef struct {
+ const void *key;
+ unsigned int current_search_size;
+ unsigned int counter;
+} cycle_detection_data;
+
+void cycle_detection_initialize(cycle_detection_data *data, const void *key);
+unsigned char cycle_detection_check_if_in_cycle(cycle_detection_data *data, const void *key);
+
+typedef struct {
const Efl_Event_Description *desc;
const Efl_Event_Cb callback;
} Elm_Atspi_Bridge_Event_Handler;
if (!root) return NULL;
void *prev_root = root;
void *return_value = NULL;
- while(1)
- {
+ cycle_detection_data cycle_detection;
+ cycle_detection_initialize(&cycle_detection, root);
+
+ while (1)
+ {
void *target = CALL(get_object_at_point, root, x, y, coordinates_are_screen_based);
if (!target) break;
if (target == root || target == prev_root) break;
if (CALL(object_is_proxy, target)) return target;
root = target;
+
void *relation_obj = CALL(get_object_in_relation_by_type, root, ATSPI_RELATION_CONTROLLED_BY);
unsigned char contains = 0;
+
if (relation_obj)
{
contains = CALL(object_contains, relation_obj, x, y, coordinates_are_screen_based);
if (contains) root = relation_obj;
}
+ if (cycle_detection_check_if_in_cycle(&cycle_detection, root)) return NULL;
+
if (_accept_object(table, root))
{
return_value = root;
return node;
}
-typedef struct {
- const void *key;
- unsigned int current_search_size;
- unsigned int counter;
-} cycle_detection_data;
-
void cycle_detection_initialize(cycle_detection_data *data, const void *key)
{
if (!data) return;