discomfitor pushed a commit to branch master.

http://git.enlightenment.org/core/enlightenment.git/commit/?id=73db701a921b3feb087a19a825e388b9df95d484

commit 73db701a921b3feb087a19a825e388b9df95d484
Author: Derek Foreman <der...@osg.samsung.com>
Date:   Fri Mar 20 15:26:08 2015 -0400

    wayland compositor: remove _e_comp_wl_client_focus()
    
    Summary:
    We now have a subset of that functionality in e_comp_wl_input.c, so use
    that function instead.  The missing bits are moved into the one remaining
    caller.
    
    Reviewers: zmike, devilhorns
    
    Subscribers: cedric
    
    Differential Revision: https://phab.enlightenment.org/D2207
---
 src/bin/e_comp_wl.c | 43 ++++++-------------------------------------
 1 file changed, 6 insertions(+), 37 deletions(-)

diff --git a/src/bin/e_comp_wl.c b/src/bin/e_comp_wl.c
index c0b206b..8f54480 100644
--- a/src/bin/e_comp_wl.c
+++ b/src/bin/e_comp_wl.c
@@ -417,45 +417,10 @@ _e_comp_wl_client_priority_normal(E_Client *ec)
 }
 
 static void
-_e_comp_wl_client_focus(E_Client *ec)
-{
-   struct wl_resource *res;
-   struct wl_client *wc;
-   uint32_t serial, *k;
-   Eina_List *l;
-
-   /* update keyboard modifier state */
-   wl_array_for_each(k, &e_comp->wl_comp_data->kbd.keys)
-     e_comp_wl_input_keyboard_state_update(e_comp->wl_comp_data, *k, 
EINA_TRUE);
-
-   if (!ec->comp_data->surface) return;
-
-   if (!eina_list_count(e_comp->wl_comp_data->kbd.resources)) return;
-
-   /* send keyboard_enter to all keyboard resources */
-   wc = wl_resource_get_client(ec->comp_data->surface);
-   serial = wl_display_next_serial(e_comp->wl_comp_data->wl.disp);
-
-   e_comp_wl_input_keyboard_modifiers_serialize(e_comp->wl_comp_data);
-
-   EINA_LIST_FOREACH(e_comp->wl_comp_data->kbd.resources, l, res)
-     {
-        if (wl_resource_get_client(res) != wc) continue;
-        wl_keyboard_send_enter(res, serial, ec->comp_data->surface,
-                               &e_comp->wl_comp_data->kbd.keys);
-        wl_keyboard_send_modifiers(res, serial,
-                                   e_comp->wl_comp_data->kbd.mod_depressed,
-                                   e_comp->wl_comp_data->kbd.mod_latched,
-                                   e_comp->wl_comp_data->kbd.mod_locked,
-                                   e_comp->wl_comp_data->kbd.mod_group);
-
-     }
-}
-
-static void
 _e_comp_wl_evas_cb_focus_in(void *data, Evas *evas EINA_UNUSED, Evas_Object 
*obj EINA_UNUSED, void *event EINA_UNUSED)
 {
    E_Client *ec, *focused;
+   uint32_t *k;
 
    if (!(ec = data)) return;
    if (e_object_is_del(E_OBJECT(ec))) return;
@@ -468,7 +433,11 @@ _e_comp_wl_evas_cb_focus_in(void *data, Evas *evas 
EINA_UNUSED, Evas_Object *obj
    /* raise client priority */
    _e_comp_wl_client_priority_raise(ec);
 
-   _e_comp_wl_client_focus(ec);
+   /* update keyboard modifier state */
+   wl_array_for_each(k, &e_comp->wl_comp_data->kbd.keys)
+     e_comp_wl_input_keyboard_state_update(e_comp->wl_comp_data, *k, 
EINA_TRUE);
+
+   e_comp_wl_input_keyboard_enter_send(ec);
 }
 
 static void

-- 


Reply via email to