diff --git a/src/wayland/compositor/tree.rs b/src/wayland/compositor/tree.rs index b2727bf..9dd7b7e 100644 --- a/src/wayland/compositor/tree.rs +++ b/src/wayland/compositor/tree.rs @@ -112,7 +112,7 @@ impl PrivateSurfaceData { .retain(|c| !c.as_ref().equals(surface.as_ref())); } // orphan all our children - for child in &my_data.children { + for child in my_data.children.drain(..) { let child_mutex = child .as_ref() .user_data()