aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDominique Martinet <asmadeus@codewreck.org>2018-06-05 00:17:01 +0900
committerDominique Martinet <asmadeus@codewreck.org>2018-06-05 00:17:58 +0900
commitcf9b8c0a8ccc4a91473551ea37345ceffe4fd1a3 (patch)
tree9f421c9773e37d604ac4067cbbb70462519b59ba
parentf11ef263797541898dd359789a4a695a4a7225ce (diff)
wlr_surface_get_root_surface: walk up parent
This would dead-loop and never walk up if called on a subsurface
-rw-r--r--types/wlr_surface.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/types/wlr_surface.c b/types/wlr_surface.c
index 22026af8..46a39a39 100644
--- a/types/wlr_surface.c
+++ b/types/wlr_surface.c
@@ -956,7 +956,7 @@ struct wlr_surface *wlr_surface_get_root_surface(struct wlr_surface *surface) {
while (wlr_surface_is_subsurface(surface)) {
struct wlr_subsurface *subsurface =
wlr_subsurface_from_surface(surface);
- surface = subsurface->surface;
+ surface = subsurface->parent;
}
return surface;
}