diff options
author | Chris Michael <cp.michael@samsung.com> | 2014-10-16 11:24:03 -0400 |
---|---|---|
committer | Chris Michael <cp.michael@samsung.com> | 2014-10-16 11:24:03 -0400 |
commit | c42b2df50eb8626fca6b2151f6b3c35813a8a5f0 (patch) | |
tree | ee698fbbe427522a8d2055f7e630821e945bb40a | |
parent | 88533db92bbe947c35a39379470a5d9f04065252 (diff) | |
download | enlightenment-c42b2df50eb8626fca6b2151f6b3c35813a8a5f0.tar.gz |
add code to handle setting surface input region
Signed-off-by: Chris Michael <cp.michael@samsung.com>
-rw-r--r-- | src/bin/e_comp_wl.c | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/src/bin/e_comp_wl.c b/src/bin/e_comp_wl.c index 4117a834f4..1a3f1dc776 100644 --- a/src/bin/e_comp_wl.c +++ b/src/bin/e_comp_wl.c @@ -321,7 +321,43 @@ _e_comp_wl_surface_cb_opaque_region_set(struct wl_client *client EINA_UNUSED, st static void _e_comp_wl_surface_cb_input_region_set(struct wl_client *client EINA_UNUSED, struct wl_resource *resource, struct wl_resource *region_resource) { + E_Pixmap *ep; + uint64_t pixid; + E_Client *ec; + DBG("Surface Input Region Set: %d", wl_resource_get_id(resource)); + + /* get the e_pixmap reference */ + if (!(ep = wl_resource_get_user_data(resource))) return; + + /* try to find the associated e_client */ + if (!(ec = e_pixmap_client_get(ep))) + { + if (!(ec = e_pixmap_find_client(E_PIXMAP_TYPE_WL, pixid))) + { + ERR("\tCould not find client from pixmap %llu", pixid); + return; + } + } + + /* trap for clients which are being deleted */ + if (e_object_is_del(E_OBJECT(ec))) return; + + if (region_resource) + { + Eina_Tiler *tmp; + + if (!(tmp = wl_resource_get_user_data(region_resource))) + return; + + eina_tiler_union(ec->comp_data->pending.input, tmp); + } + else + { + eina_tiler_clear(ec->comp_data->pending.input); + eina_tiler_rect_add(ec->comp_data->pending.input, + &(Eina_Rectangle){0, 0, ec->client.w, ec->client.h}); + } } static void |