wayland: introduce Seat::owns

This commit is contained in:
Victor Berger 2018-02-26 15:36:53 +01:00 committed by Victor Berger
parent 6c1d310a23
commit d8a5acef77
1 changed files with 5 additions and 0 deletions

View File

@ -203,6 +203,11 @@ impl Seat {
}
}
/// Checks wether a given `WlSeat` is associated with this `Seat`
pub fn owns(&self, seat: &wl_seat::WlSeat) -> bool {
self.known_seats.iter().any(|s| s.equals(seat))
}
/// Cleanup internal states from old resources
///
/// Deletes all remnnant of ressources from clients that