itr = eina_tiler_iterator_new(src);
EINA_ITERATOR_FOREACH(itr, rect)
{
- ELOGF("COMP", "Set Input Area x:%d, y:%d, w:%d, h:%d",
- ec, rect->x, rect->y, rect->w, rect->h);
+ ELOGF("COMP", "Set Input Area x:%d, y:%d, w:%d, h:%d, ec(%dx%d), state(%dx%d)",
+ ec, rect->x, rect->y, rect->w, rect->h,
+ ec->w, ec->h, state->bw, state->bh);
e_comp_object_input_area_set(ec->frame,
rect->x, rect->y,
rect->w, rect->h);
}
static void
+_e_comp_wl_region_area_check(struct wl_client *client, Eina_Tiler *tiler, int32_t x, int32_t y, int32_t w, int32_t h)
+{
+ Eina_Bool need_set = EINA_FALSE;
+ int area_w = 0;
+ int area_h = 0;
+
+ eina_tiler_area_size_get(tiler, &area_w, &area_h);
+ if (x + w > area_w)
+ {
+ area_w = x + w;
+ need_set = EINA_TRUE;
+ }
+
+ if (y + h > area_h)
+ {
+ area_h = y + h;
+ need_set = EINA_TRUE;
+ }
+
+ if (need_set)
+ {
+ INF("change region area. client:%8p(%dx%d)", client, area_w, area_h);
+ eina_tiler_area_size_set(tiler, area_w, area_h);
+ }
+}
+
+static void
_e_comp_wl_region_cb_add(struct wl_client *client EINA_UNUSED, struct wl_resource *resource, int32_t x, int32_t y, int32_t w, int32_t h)
{
Eina_Tiler *tiler;
/* get the tiler from the resource */
if ((tiler = wl_resource_get_user_data(resource)))
- eina_tiler_rect_add(tiler, &(Eina_Rectangle){x, y, w, h});
+ {
+ _e_comp_wl_region_area_check(client, tiler, x, y ,w, h);
+ eina_tiler_rect_add(tiler, &(Eina_Rectangle){x, y, w, h});
+ }
}
static void