discomfitor pushed a commit to branch master.

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

commit e5678549daec258dd068dee270da362a578d9ae4
Author: Mike Blumenkrantz <zm...@osg.samsung.com>
Date:   Tue Aug 4 18:44:23 2015 -0400

    track the current pointer focus client in wayland compositor
---
 src/bin/e_comp_wl.c | 3 +++
 src/bin/e_comp_wl.h | 3 ++-
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/src/bin/e_comp_wl.c b/src/bin/e_comp_wl.c
index a87fef5..160ac19 100644
--- a/src/bin/e_comp_wl.c
+++ b/src/bin/e_comp_wl.c
@@ -163,6 +163,7 @@ _e_comp_wl_evas_cb_mouse_in(void *data, Evas *evas 
EINA_UNUSED, Evas_Object *obj
 
    if (!ec->comp_data->surface) return;
 
+   e_comp->wl_comp_data->ptr.ec = ec;
    if (!eina_list_count(e_comp->wl_comp_data->ptr.resources)) return;
 
    wc = wl_resource_get_client(ec->comp_data->surface);
@@ -196,6 +197,8 @@ _e_comp_wl_evas_cb_mouse_out(void *data, Evas *evas 
EINA_UNUSED, Evas_Object *ob
       if (e_comp->pointer->o_ptr != o)
         e_pointer_object_set(e_comp->pointer, NULL, 0, 0);
    }
+   if (e_comp->wl_comp_data->ptr.ec == ec)
+     e_comp->wl_comp_data->ptr.ec = NULL;
    if (e_object_is_del(E_OBJECT(ec))) return;
 
    if (!ec->comp_data->surface) return;
diff --git a/src/bin/e_comp_wl.h b/src/bin/e_comp_wl.h
index 08a193f..67cb677 100644
--- a/src/bin/e_comp_wl.h
+++ b/src/bin/e_comp_wl.h
@@ -159,10 +159,11 @@ struct _E_Comp_Wl_Data
    struct
      {
         Eina_List *resources;
-        Eina_Bool enabled : 1;
         wl_fixed_t x, y;
         wl_fixed_t grab_x, grab_y;
         uint32_t button;
+        E_Client *ec;
+        Eina_Bool enabled : 1;
      } ptr;
 
    struct

-- 


Reply via email to