e_comp_object: fix corrupt e_comp's layer inlist 38/267538/1 submit/tizen/20211207.041859
authorDoyoun Kang <doyoun.kang@samsung.com>
Tue, 7 Dec 2021 02:51:59 +0000 (11:51 +0900)
committerDoyoun Kang <doyoun.kang@samsung.com>
Tue, 7 Dec 2021 02:52:03 +0000 (11:52 +0900)
There was a bug that the e_comp's layer inlist was corrupted.

This could be occurred when the window which has transient children and sub-surface changed its layer.
E remove a parent from the inlist, and then changed the layer of children and sub-surface.

In subsurface code, there is a callback function for EVAS_CALLBACK_RESTACK.
And it calls stack_above or stack_below to the parent.
But unfortunately, the parent was removed from inlist. So, inlist could corrupted in this case.

This patch resolve this problem.

Change-Id: I2018a7409366e73bc8bd67f2a547da8755225046

src/bin/e_comp_object.c

index 2f8e8ce11fef120a0a58a0b71fe5ffe89fe77310..99a5290c888f1038f5847f4af05bd155c85eed65 100644 (file)
@@ -1843,7 +1843,7 @@ layer_set:
         return;
      }
    oldraise = e_config->transient.raise;
-   _e_comp_object_layers_remove(cw);
+
    /* clamp to valid client layer */
    layer = e_comp_canvas_client_layer_map_nearest(layer);
    cw->ec->layer = layer;
@@ -1881,6 +1881,8 @@ layer_set:
      }
 
    e_config->transient.raise = oldraise;
+
+   _e_comp_object_layers_remove(cw);
    cw->layer = e_comp_canvas_layer_map(layer);
    _e_comp_object_layers_add(cw, NULL, NULL, 0);
    //if (cw->ec->new_client)