From 4b98489019ec18a19ba257e690ec2ce2b512f9d1 Mon Sep 17 00:00:00 2001 From: Derek Foreman Date: Fri, 13 Feb 2015 10:46:10 -0600 Subject: [PATCH] Conditionally ignore wayland cursor set events Wayland cursor set events should be ignored if the client sending them doesn't own the surface the pointer is currently in. Signed-off-by: Derek Foreman --- src/bin/e_comp_wl_input.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/bin/e_comp_wl_input.c b/src/bin/e_comp_wl_input.c index 51f124851..f072281f2 100644 --- a/src/bin/e_comp_wl_input.c +++ b/src/bin/e_comp_wl_input.c @@ -33,9 +33,21 @@ _e_comp_wl_input_pointer_cb_cursor_set(struct wl_client *client, struct wl_resou pid_t pid; E_Client *ec; uint64_t sid; + Eina_Bool got_mouse = EINA_FALSE; /* get compositor data */ if (!(cdata = wl_resource_get_user_data(resource))) return; + E_CLIENT_FOREACH(e_comp, ec) + { + if (!ec->comp_data->surface) continue; + if (client != wl_resource_get_client(ec->comp_data->surface)) continue; + if (ec->mouse.in) + { + got_mouse = EINA_TRUE; + break; + } + } + if (!got_mouse) return; if (!surface_resource) { e_pointer_object_set(e_comp->pointer, NULL, x, y);