clients: Moving and rotating transient surfaces

Transient surfaces use child/parent surfaces for stacking order. This
change resloves an issue in which attempting to move or rotate a
toplevel transient surface can move or rotate its ancestor.
This commit is contained in:
Ben Hummon
2015-10-06 11:48:14 -05:00
committed by Derek Foreman
parent ed8dd4ef6a
commit 445e44cfb2
+5 -8
View File
@@ -486,18 +486,15 @@ find_toplevel_surface(struct shell_surface *in_surface)
{ {
struct shell_surface *surface = in_surface; struct shell_surface *surface = in_surface;
if (!surface) while (surface) {
return NULL; if (surface->type == SHELL_SURFACE_TOPLEVEL)
return surface;
while (surface->parent)
surface = get_shell_surface(surface->parent); surface = get_shell_surface(surface->parent);
}
/* If no top level surface was found, just use whatever surface was /* If no top level surface was found, just use whatever surface was
originally provided. */ originally provided. */
if (!surface || surface->type != SHELL_SURFACE_TOPLEVEL) return in_surface;
surface = in_surface;
return surface;
} }
static void static void