From 45928f239be97ec03a0ca387f41d4e5365561fb2 Mon Sep 17 00:00:00 2001 From: Junkyeong Kim Date: Mon, 13 Mar 2023 20:28:30 +0900 Subject: [PATCH] e_comp_wl: Change input region set method erase round off error protection code. use ec's w and h value instead state's w and h to get input region. Change-Id: I197500f61b8d3655ae609036ca91d03c99ca285f --- src/bin/e_comp_wl.c | 23 ++++------------------- 1 file changed, 4 insertions(+), 19 deletions(-) diff --git a/src/bin/e_comp_wl.c b/src/bin/e_comp_wl.c index 53418e3..e15975e 100644 --- a/src/bin/e_comp_wl.c +++ b/src/bin/e_comp_wl.c @@ -2939,13 +2939,8 @@ _e_comp_wl_surface_state_commit(E_Client *ec, E_Comp_Wl_Surface_State *state) ec->first_mapped) { Eina_Tiler *src, *tmp; - int sw, sh; - - if (state->bw > 0) sw = state->bw; - else sw = ec->w; - - if (state->bh > 0) sh = state->bh; - else sh = ec->h; + int sw = ec->w; + int sh = ec->h; tmp = eina_tiler_new(sw, sh); eina_tiler_tile_size_set(tmp, 1, 1); @@ -2955,28 +2950,18 @@ _e_comp_wl_surface_state_commit(E_Client *ec, E_Comp_Wl_Surface_State *state) if ((src = eina_tiler_intersection(state->input, tmp))) { - Eina_Rectangle *rect, *rect_input; - Eina_Iterator *itr, *itr_input; + Eina_Rectangle *rect; + Eina_Iterator *itr; e_comp_object_input_objs_del(ec->frame); itr = eina_tiler_iterator_new(src); EINA_ITERATOR_FOREACH(itr, rect) { - itr_input = eina_tiler_iterator_new(state->input); - EINA_ITERATOR_FOREACH(itr_input, rect_input) - { - if ((rect->x == rect_input->x) && (rect->y == rect_input->y)) - { - if (rect->w > rect_input->w) rect->w = rect_input->w; - if (rect->h > rect_input->h) rect->h = rect_input->h; - } - } ELOGF("COMP", "Set Input Area x:%d, y:%d, w:%d, h:%d", ec, rect->x, rect->y, rect->w, rect->h); e_comp_object_input_area_set(ec->frame, rect->x, rect->y, rect->w, rect->h); - eina_iterator_free(itr_input); } eina_iterator_free(itr); -- 2.7.4