summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Michael <cp.michael@samsung.com>2014-10-16 11:26:18 -0400
committerChris Michael <cp.michael@samsung.com>2014-10-16 11:26:18 -0400
commitf934b05fb1c17d138b4ddae02b4838a5c97a0449 (patch)
treea1cc8576d83b49fff49048be64f3db3c2aa6215b
parent55032dd3f1c0a5627a7d224d29bdc9f79fd4fb45 (diff)
downloadenlightenment-f934b05fb1c17d138b4ddae02b4838a5c97a0449.tar.gz
add code to handle pending input regions during surface commit
Signed-off-by: Chris Michael <cp.michael@samsung.com>
-rw-r--r--src/bin/e_comp_wl.c47
1 files changed, 47 insertions, 0 deletions
diff --git a/src/bin/e_comp_wl.c b/src/bin/e_comp_wl.c
index f15c444ed5..9b6a32fe07 100644
--- a/src/bin/e_comp_wl.c
+++ b/src/bin/e_comp_wl.c
@@ -1017,5 +1017,52 @@ e_comp_wl_surface_commit(E_Client *ec)
}
}
+ /* handle pending input */
+ if (ec->comp_data->pending.input)
+ {
+ tmp = eina_tiler_new(ec->w, ec->h);
+ eina_tiler_tile_size_set(tmp, 1, 1);
+ eina_tiler_rect_add(tmp,
+ &(Eina_Rectangle){0, 0, ec->client.w, ec->client.h});
+
+ if ((src = eina_tiler_intersection(ec->comp_data->pending.input, tmp)))
+ {
+ Eina_Rectangle *rect;
+ Eina_Iterator *itr;
+ int i = 0;
+
+ ec->shape_input_rects_num = 0;
+
+ itr = eina_tiler_iterator_new(src);
+ EINA_ITERATOR_FOREACH(itr, rect)
+ ec->shape_input_rects_num += 1;
+
+ ec->shape_input_rects =
+ malloc(sizeof(Eina_Rectangle) * ec->shape_input_rects_num);
+
+ if (ec->shape_input_rects)
+ {
+ EINA_ITERATOR_FOREACH(itr, rect)
+ {
+ ec->shape_input_rects[i] =
+ *(Eina_Rectangle *)((char *)rect);
+
+ ec->shape_input_rects[i].x = rect->x;
+ ec->shape_input_rects[i].y = rect->y;
+ ec->shape_input_rects[i].w = rect->w;
+ ec->shape_input_rects[i].h = rect->h;
+
+ i++;
+ }
+ }
+
+ eina_iterator_free(itr);
+ eina_tiler_free(src);
+ }
+
+ eina_tiler_free(tmp);
+ eina_tiler_clear(ec->comp_data->pending.opaque);
+ }
+
return EINA_TRUE;
}