e_comp_wl_input: check if wl_client of the cursor is same as that of e_comp_wl->ptr.ec 78/96778/3
authorDuna Oh <duna.oh@samsung.com>
Thu, 10 Nov 2016 06:34:34 +0000 (15:34 +0900)
committerGwanglim Lee <gl77.lee@samsung.com>
Thu, 17 Nov 2016 01:02:36 +0000 (17:02 -0800)
Should map(show) an cursor only when the owner client of cursor got Evas_Event_Mouse_In.

Signed-off-by: Duna Oh <duna.oh@samsung.com>
Change-Id: I452086162c0521ae02caef3066a0db179cca4d82

src/bin/e_comp_wl_input.c

index b362871..408a4c0 100644 (file)
@@ -31,10 +31,15 @@ _e_comp_wl_input_pointer_map(struct wl_resource *resource)
 {
    E_Client *ec;
    E_Pointer *ptr;
+   struct wl_client *wc;
 
    if (!(ec = wl_resource_get_user_data(resource))) return;
    if (e_object_is_del(E_OBJECT(ec))) return;
 
+   if (!e_comp_wl->ptr.ec || !e_comp_wl->ptr.ec->comp_data || !e_comp_wl->ptr.ec->comp_data->surface) return;
+   wc = wl_resource_get_client(resource);
+   if (wc != wl_resource_get_client(e_comp_wl->ptr.ec->comp_data->surface)) return;
+
    if ((ptr = e_comp->pointer))
      e_pointer_object_set(ptr, ec->frame, ptr->hot.x, ptr->hot.y);
 }