beece0215f
This commit adds code to maintain the correct order and linking of a surface in its surface tree list for when a new parent is being set on it. If the new parent is not NULL, the child might already belong to the same surface tree as the new parent's root, in which case no relinking is necessary. Check this by calling kiosk_shell_surface_is_surface_in_tree(shsurf, shroot), to see if 'shsurf' is in the surface tree list represented by 'shroot', where 'shroot' is the new parent's root surface. In case 'shsurf' doesn't belong to this surface tree, relink it there. If parent is NULL, 'shsurf' will become root of a new surface tree list. In this case 'shroot' is the root surface of shsurf's current surface tree list. Iterate through the surface tree list of this 'shroot' to relink all descendents of 'shsurf' into this new list and set it as the new active surface tree for the output. Signed-off-by: Sergio Gómez <sergio.g.delreal@gmail.com> |
||
---|---|---|
.. | ||
kiosk-shell-grab.c | ||
kiosk-shell-grab.h | ||
kiosk-shell.c | ||
kiosk-shell.h | ||
meson.build |