diff --git a/src/bin/e_comp_wl.c b/src/bin/e_comp_wl.c index b50ae141e..362224d2a 100644 --- a/src/bin/e_comp_wl.c +++ b/src/bin/e_comp_wl.c @@ -199,6 +199,18 @@ _e_comp_wl_evas_cb_mouse_out(void *data, Evas *evas EINA_UNUSED, Evas_Object *ob if (!(ec = data)) return; if (ec->cur_mouse_action) return; + /* FIXME? this is a hack to just reset the cursor whenever we mouse out. not sure if accurate */ + { + Evas_Object *o; + + ecore_evas_cursor_get(e_comp->ee, &o, NULL, NULL, NULL); + if (e_comp->pointer->o_ptr != o) + { + ecore_evas_cursor_unset(e_comp->ee); + ecore_evas_object_cursor_set(e_comp->ee, e_comp->pointer->o_ptr, + EVAS_LAYER_MAX, e_comp->pointer->hot.x, e_comp->pointer->hot.y); + } + } if (e_object_is_del(E_OBJECT(ec))) return; if (!ec->comp_data->surface) return; diff --git a/src/bin/e_comp_wl_input.c b/src/bin/e_comp_wl_input.c index 8c1ec77ae..57f8dd095 100644 --- a/src/bin/e_comp_wl_input.c +++ b/src/bin/e_comp_wl_input.c @@ -27,12 +27,30 @@ _e_comp_wl_input_cb_resource_destroy(struct wl_client *client EINA_UNUSED, struc } static void -_e_comp_wl_input_pointer_cb_cursor_set(struct wl_client *client EINA_UNUSED, struct wl_resource *resource EINA_UNUSED, uint32_t serial EINA_UNUSED, struct wl_resource *surface_resource EINA_UNUSED, int32_t x EINA_UNUSED, int32_t y EINA_UNUSED) +_e_comp_wl_input_pointer_cb_cursor_set(struct wl_client *client, struct wl_resource *resource EINA_UNUSED, uint32_t serial EINA_UNUSED, struct wl_resource *surface_resource, int32_t x, int32_t y) { E_Comp_Data *cdata; + pid_t pid; + E_Client *ec; + uint64_t sid; /* get compositor data */ if (!(cdata = wl_resource_get_user_data(resource))) return; + wl_client_get_credentials(client, &pid, NULL, NULL); + sid = e_comp_wl_id_get(wl_resource_get_id(surface_resource), pid); + if (!(ec = e_pixmap_find_client(E_PIXMAP_TYPE_WL, sid))) + { + ec = e_client_new(NULL, e_pixmap_new(E_PIXMAP_TYPE_WL, sid), 1, 0); + ec->layer_block = ec->visible = ec->override = 1; + ec->new_client = 0; + ec->icccm.title = eina_stringshare_add("noshadow"); + evas_object_pass_events_set(ec->frame, 1); + ec->client.w = ec->client.h = 1; + } + /* ignore cursor changes during resize/move I guess */ + if (e_client_action_get()) return; + ecore_evas_cursor_unset(e_comp->ee); + ecore_evas_object_cursor_set(e_comp->ee, ec->frame, EVAS_LAYER_MAX, x, y); } static const struct wl_pointer_interface _e_pointer_interface =