summaryrefslogtreecommitdiff
path: root/desktop-shell
diff options
context:
space:
mode:
authorBen Hummon <benjamin.hummon@gmail.com>2015-10-06 11:48:14 -0500
committerDerek Foreman <derekf@osg.samsung.com>2015-10-06 15:24:28 -0500
commit445e44cfb217946d42db6decda7f21ec0fb5bf23 (patch)
treedc93d2593a6313141d3d2d18e896980ed1f1e7ca /desktop-shell
parented8dd4ef6a9bf253e3638678273f6785db1a24b6 (diff)
downloadweston-445e44cfb217946d42db6decda7f21ec0fb5bf23.tar.gz
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.
Diffstat (limited to 'desktop-shell')
-rw-r--r--desktop-shell/shell.c13
1 files changed, 5 insertions, 8 deletions
diff --git a/desktop-shell/shell.c b/desktop-shell/shell.c
index 3c6a3da7..09ce5e18 100644
--- a/desktop-shell/shell.c
+++ b/desktop-shell/shell.c
@@ -486,18 +486,15 @@ find_toplevel_surface(struct shell_surface *in_surface)
{
struct shell_surface *surface = in_surface;
- if (!surface)
- return NULL;
-
- while (surface->parent)
+ while (surface) {
+ if (surface->type == SHELL_SURFACE_TOPLEVEL)
+ return surface;
surface = get_shell_surface(surface->parent);
+ }
/* If no top level surface was found, just use whatever surface was
originally provided. */
- if (!surface || surface->type != SHELL_SURFACE_TOPLEVEL)
- surface = in_surface;
-
- return surface;
+ return in_surface;
}
static void