atspi: win overrides atspi component get interface 45/153845/1
authorShinwoo Kim <cinoo.kim@samsung.com>
Sat, 23 Sep 2017 13:34:52 +0000 (22:34 +0900)
committerShinwoo Kim <cinoo.kim@samsung.com>
Sat, 30 Sep 2017 08:47:33 +0000 (17:47 +0900)
(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
src/lib/elm_win.c
src/lib/elm_win.eo

index 96256297eca86ab7de4f77f2181e0b7e8f8aca65..d19980ef72b982812b5a99c425019beed76e2a33 100644 (file)
@@ -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;
index 2ceb78e85582270d869ecbf362f984a51e6d7aad..1e20de1eeb9c183f572bc1efe10bfc5433b36fec 100644 (file)
@@ -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"
 
 //////////////////////////////////////////////////////////////////
index 7615e29372e376a278c8e0374f101b34db46e145..505d862257eaba2efb1843d012385da476aa246b 100644 (file)
@@ -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;