stanluk pushed a commit to branch master.

http://git.enlightenment.org/core/elementary.git/commit/?id=d64d752429130827a8ad37139d885f03b97c9fd4

commit d64d752429130827a8ad37139d885f03b97c9fd4
Author: Lukasz Stanislawski <l.stanisl...@samsung.com>
Date:   Wed Oct 28 17:02:01 2015 +0100

    win: reemit atspi "focused" event on bridge connection
    
    At-spi clients assume that object:state-changed:focused event is emitted
    on application start. By the time atspi_bridge will establish
    connection on at-spi bus all focused events are already emitted.
    To fix this we reemit "focused" event in bridge connection callback.
    
    This fixes a bug when Orca screen reader do not read first element after
    application launch.
    
    @fix
---
 src/lib/elm_win.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/src/lib/elm_win.c b/src/lib/elm_win.c
index 12bc7c1..f9d3e84 100644
--- a/src/lib/elm_win.c
+++ b/src/lib/elm_win.c
@@ -5569,6 +5569,13 @@ _on_atspi_bus_connected(void *data EINA_UNUSED, Eo *obj 
EINA_UNUSED, const Eo_Ev
         if (elm_win_focus_get(win))
           {
              elm_interface_atspi_window_activated_signal_emit(win);
+             /** Reemit focused event to inform atspi clients about currently
+              * focused object **/
+             unsigned int order = 0;
+             Evas_Object *target;
+             eo_do(win, target = elm_obj_widget_newest_focus_order_get(&order, 
EINA_TRUE));
+             if (target)
+               
elm_interface_atspi_accessible_state_changed_signal_emit(target, 
ELM_ATSPI_STATE_FOCUSED, EINA_TRUE);
           }
         else
           elm_interface_atspi_window_deactivated_signal_emit(win);

-- 


Reply via email to