From e5678549daec258dd068dee270da362a578d9ae4 Mon Sep 17 00:00:00 2001 From: Mike Blumenkrantz Date: Tue, 4 Aug 2015 18:44:23 -0400 Subject: [PATCH] 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 a87fef5c6..160ac199c 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 08a193f96..67cb67767 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