error = NULL;\
}
+typedef struct
+{
+ int x,y;
+} last_focus_t;
+
+static last_focus_t last_focus = {-1,-1};
static AtspiAccessible *current_obj;
static AtspiAccessible *top_window;
static AtspiScrollable *scrolled_obj;
AtspiComponent *comp = atspi_accessible_get_component(obj);
if (!comp)
{
- ERROR("AtspiComponent *comp NULL");
+ GError *err = NULL;
+ gchar *role = atspi_accessible_get_role_name(obj, &err);
+ ERROR("AtspiComponent *comp NULL, [%s]", role);
+ GERROR_CHECK(err);
+ g_free(role);
return;
}
atspi_component_grab_highlight(comp, &err);
window_component = atspi_accessible_get_component(top_window);
if(!window_component)
return;
+ if ((last_focus.x == info->x_begin) && (last_focus.y == info->y_begin))
+ return;
target_widget = atspi_component_get_accessible_at_point(window_component, info->x_begin, info->y_begin, ATSPI_COORD_TYPE_WINDOW, &err);
GERROR_CHECK(err)
if (target_widget) {
if (flat_navi_context_current_set(context, target_widget))
- _current_highlight_object_set(target_widget);
+ {
+ _current_highlight_object_set(target_widget);
+ last_focus.x = info->x_begin;
+ last_focus.y = info->y_begin;
+ }
else
- ERROR("Hoveed object not found in window context");
+ ERROR("Hoveed object not found in window context[%dx%d][%s]", info->x_begin, info->y_begin, atspi_accessible_get_role_name(top_window, &err));
}
else
DEBUG("NO widget under (%d, %d) found",