Fix clipboard not working when seat has empty name

This commit is contained in:
Kirill Chibisov 2020-07-10 21:35:02 +03:00 committed by Victor Berger
parent e497d7f526
commit f4abc24f11
3 changed files with 6 additions and 4 deletions

View file

@ -144,7 +144,7 @@ fn worker_impl(display: Display, request_rx: Receiver<Command>, reply_tx: Sender
// Listen for seats.
let _listener = env.listen_for_seats(move |seat, seat_data, _| {
let detached_seat = seat.clone().detach();
let detached_seat = seat.detach();
let pos = seats.iter().position(|st| st.seat == detached_seat);
let index = pos.unwrap_or_else(|| {
seats.push(SeatData::new(detached_seat, None, None));