e_comp_wl: Change input region set method 15/289715/1 accepted/tizen/unified/20230316.045741
authorJunkyeong Kim <jk0430.kim@samsung.com>
Mon, 13 Mar 2023 11:28:30 +0000 (20:28 +0900)
committerTizen Window System <tizen.windowsystem@gmail.com>
Tue, 14 Mar 2023 02:21:48 +0000 (11:21 +0900)
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

index 53418e3..e15975e 100644 (file)
@@ -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);