subsurface: Do not update stacking order of entire sub-surface tree. 62/246162/3
authorSeunghun Lee <shiin.lee@samsung.com>
Thu, 22 Oct 2020 04:41:18 +0000 (13:41 +0900)
committerSeunghun Lee <shiin.lee@samsung.com>
Tue, 27 Oct 2020 02:32:58 +0000 (11:32 +0900)
commit3d028b1c348ab53170b4f6e70ebe0794de14ff8d
treeb8266f2f9f3589b834b7c9da053d962d01547463
parent1cf2f111f9ff9a1043cde8c0f201ee53d74ef0a4
subsurface: Do not update stacking order of entire sub-surface tree.

Accoding to the description of wl_subsurface, stacking order of the
parent and its sub-surfaces is applied when the parent surface's
wl_surface state is applied, regardless of the sub-surface's mode.

However enlightenment updates stacking order of the topmost parent and
its sub-surfaces when any wl_surface(in the tree) state was applied.
This is the point that is different with the description.
This patch corrects it.

Here is a possible problem without this patch.
Let's say there are surfaces which make up the tree of sub-surfaces:

                       0
                     /   \
              1(desync)   2
                 / \     / \
                3   4   5   6

And let's say client writes wayland protocol like this:

wl_subsurface_place_below(4, 3)
wl_subsurface_place_below(2, 1)
wl_surface_commit(1)

wl_display_dispatch(wl_display)

It should only place surface 4 under the surface 3, but should not place
surface 2 under the surface 1 because surface 0's state isn't applied
yet. Without this patch, this code will place surface 2 under the
surface 1 as well.

Change-Id: Icacf0ea171ac898a66c7afa33727be93934544b3
src/bin/e_comp_wl.c
src/bin/e_comp_wl_subsurface.c