forked from enlightenment/efl
elementary: win - override atspi component get interface
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).
This commit is contained in:
parent
258b42b47b
commit
7a2aeec9ce
|
@ -3,6 +3,7 @@
|
|||
#endif
|
||||
|
||||
#define ELM_INTERFACE_ATSPI_ACCESSIBLE_PROTECTED
|
||||
#define ELM_INTERFACE_ATSPI_COMPONENT_PROTECTED
|
||||
#define ELM_INTERFACE_ATSPI_WIDGET_ACTION_PROTECTED
|
||||
#define EFL_INPUT_EVENT_PROTECTED
|
||||
#define EFL_GFX_SIZE_HINT_PROTECTED
|
||||
|
@ -6440,6 +6441,24 @@ _efl_ui_win_elm_interface_atspi_accessible_name_get(Eo *obj, Efl_Ui_Win_Data *sd
|
|||
return name;
|
||||
}
|
||||
|
||||
EOLIAN static void
|
||||
_efl_ui_win_elm_interface_atspi_component_extents_get(Eo *obj, Efl_Ui_Win_Data *_pd EINA_UNUSED, Eina_Bool screen_coords, int *x, int *y, int *w, int *h)
|
||||
{
|
||||
int ee_x, ee_y;
|
||||
|
||||
*x = 0;
|
||||
*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;
|
||||
}
|
||||
}
|
||||
|
||||
EOLIAN static Eina_Bool
|
||||
_efl_ui_win_efl_input_state_modifier_enabled_get(Eo *obj EINA_UNUSED, Efl_Ui_Win_Data *pd, const char *name)
|
||||
{
|
||||
|
|
|
@ -176,10 +176,9 @@ enum Efl.Ui.Win.Move_Resize_Mode
|
|||
}
|
||||
|
||||
class Efl.Ui.Win (Elm.Widget, Efl.Canvas, Elm.Interface.Atspi.Window,
|
||||
Elm.Interface.Atspi_Widget_Action, Efl.Container,
|
||||
Efl.Input.State, Efl.Input.Interface, Efl.Screen,
|
||||
Efl.Gfx.Size.Hint, Efl.Text, Efl.Config.Global,
|
||||
Efl.Part)
|
||||
Elm.Interface.Atspi_Component, Elm.Interface.Atspi_Widget_Action,
|
||||
Efl.Container, Efl.Input.State, Efl.Input.Interface, Efl.Screen,
|
||||
Efl.Gfx.Size.Hint, Efl.Text, Efl.Config.Global, Efl.Part)
|
||||
{
|
||||
[[Efl UI window class]]
|
||||
legacy_prefix: elm_win;
|
||||
|
@ -938,6 +937,7 @@ class Efl.Ui.Win (Elm.Widget, Efl.Canvas, Elm.Interface.Atspi.Window,
|
|||
Elm.Interface.Atspi_Accessible.parent { get; }
|
||||
Elm.Interface.Atspi_Accessible.state_set { get; }
|
||||
Elm.Interface.Atspi_Accessible.name { get; }
|
||||
Elm.Interface.Atspi_Component.extents { get; }
|
||||
Elm.Interface.Atspi_Widget_Action.elm_actions { get; }
|
||||
Efl.Input.State.modifier_enabled { get; }
|
||||
Efl.Input.State.lock_enabled { get; }
|
||||
|
|
Loading…
Reference in New Issue