From 323bb4e395256f7f3d0e155224608b031ef74f17 Mon Sep 17 00:00:00 2001 From: Shinwoo Kim Date: Sat, 23 Sep 2017 22:34:52 +0900 Subject: [PATCH] atspi: win overrides atspi component get interface (1) The efl_ui_win overrides _elm_interface_atspi_component_extents_get to give correct value if screen_coord is EINA_FALSE which means relative position. The efl_ui_win has given its object geometry value + ecore evas geometry value. The object geometry value was equal to the ecore evas geometry value, so the relative position was not correct(twice of ecore evas geometry value). (2) Allow ELM_ROLE_INPUT_METHOD_WINDOW to send signal Change-Id: I1b6832e960b3123d2a817d6253313447bc31af08 --- src/lib/elm_atspi_bridge.c | 2 ++ src/lib/elm_win.c | 18 ++++++++++++++++++ src/lib/elm_win.eo | 2 ++ 3 files changed, 22 insertions(+) diff --git a/src/lib/elm_atspi_bridge.c b/src/lib/elm_atspi_bridge.c index 9625629..d19980e 100644 --- a/src/lib/elm_atspi_bridge.c +++ b/src/lib/elm_atspi_bridge.c @@ -5500,12 +5500,14 @@ _state_changed_signal_send(void *data, Eo *obj EINA_UNUSED, const Eo_Event_Descr { if ((role != ELM_ATSPI_ROLE_WINDOW) && (role != ELM_ATSPI_ROLE_PAGE_TAB) && + (role != ELM_ATSPI_ROLE_INPUT_METHOD_WINDOW) && (!STATE_TYPE_GET(ss, ELM_ATSPI_STATE_MODAL))) return EINA_FALSE; } else /* Not Showing */ { if ((role != ELM_ATSPI_ROLE_WINDOW) && + (role != ELM_ATSPI_ROLE_INPUT_METHOD_WINDOW) && (!STATE_TYPE_GET(ss, ELM_ATSPI_STATE_MODAL)) && (_elm_object_accessibility_currently_highlighted_get() != (void *)obj)) return EINA_FALSE; diff --git a/src/lib/elm_win.c b/src/lib/elm_win.c index 2ceb78e..1e20de1 100644 --- a/src/lib/elm_win.c +++ b/src/lib/elm_win.c @@ -7145,6 +7145,24 @@ _elm_win_elm_interface_atspi_accessible_name_get(Eo *obj, Elm_Win_Data *sd EINA_ return _elm_widget_accessible_plain_name_get(obj, elm_win_title_get(obj)); } +EOLIAN static void +_elm_win_elm_interface_atspi_component_extents_get(Eo *obj, Elm_Win_Data *sd EINA_UNUSED, Eina_Bool screen_coords, int *x, int *y, int *w, int *h) +{ + int ee_x, ee_y; + + if (x) *x = 0; + if (y) *y = 0; + evas_object_geometry_get(obj, NULL, NULL, w, h); + if (screen_coords) + { + Ecore_Evas *ee = ecore_evas_ecore_evas_get(evas_object_evas_get(obj)); + if (!ee) return; + ecore_evas_geometry_get(ee, &ee_x, &ee_y, NULL, NULL); + if (x) *x += ee_x; + if (y) *y += ee_y; + } +} + #include "elm_win.eo.c" ////////////////////////////////////////////////////////////////// diff --git a/src/lib/elm_win.eo b/src/lib/elm_win.eo index 7615e29..505d862 100644 --- a/src/lib/elm_win.eo +++ b/src/lib/elm_win.eo @@ -201,6 +201,7 @@ enum Elm.Win.Move_Resize_Mode } class Elm.Win (Elm.Widget, Elm_Interface_Atspi_Window, + Elm_Interface_Atspi_Component, Elm_Interface_Atspi_Widget_Action) { eo_prefix: elm_obj_win; @@ -1890,6 +1891,7 @@ class Elm.Win (Elm.Widget, Elm_Interface_Atspi_Window, Elm_Interface_Atspi_Accessible.state_set.get; Elm_Interface_Atspi_Accessible.name.get; Elm_Interface_Atspi_Widget_Action.elm_actions.get; + Elm_Interface_Atspi_Component.extents.get; } constructors { .name; -- 2.7.4