From d8a5acef7758577491e4c60bd0636315177404df Mon Sep 17 00:00:00 2001 From: Victor Berger Date: Mon, 26 Feb 2018 15:36:53 +0100 Subject: [PATCH] wayland: introduce Seat::owns --- src/wayland/seat/mod.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/wayland/seat/mod.rs b/src/wayland/seat/mod.rs index 48b096d..5fc6b2e 100644 --- a/src/wayland/seat/mod.rs +++ b/src/wayland/seat/mod.rs @@ -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