pub fn new<L>(display: &mut Display, name: String, logger: L) -> (Seat, Global<wl_seat::WlSeat>)
    where
        L: Into<Option<::slog::Logger>>,
    {
        let log = crate::slog_or_fallback(logger);
        let arc = Rc::new(SeatRc {
            inner: RefCell::new(Inner {
                pointer: None,
                keyboard: None,
                known_seats: Vec::new(),
            }),
            log: log.new(slog::o!("smithay_module" => "seat_handler", "seat_name" => name.clone())),
            name,
            user_data: UserDataMap::new(),
        });
        let seat = Seat { arc: arc.clone() };
        let global = display.create_global(
            5,
            Filter::new(move |(new_seat, _version), _, _| {
                let seat = implement_seat(new_seat, arc.clone());
                let mut inner = arc.inner.borrow_mut();
                if seat.as_ref().version() >= 2 {
                    seat.name(arc.name.clone());
                }
                seat.capabilities(inner.compute_caps());
                inner.known_seats.push(seat);
            }),
        );
        (seat, global)
    }
/// Create a new seat global
///
/// A new seat global is created with given name and inserted
/// into this wayland display.
///
/// You are provided with the state token to retrieve it (allowing
/// you to add or remove capabilities from it), and the global handle,
/// in case you want to remove it.
Create a new seat global
A new seat global is created with given name and inserted
into this wayland display.

You are provided with the state token to retrieve it (allowing
you to add or remove capabilities from it), and the global handle,
in case you want to remove it.
Create a new seat global A new seat global is created with given name and inserted into this wayland display . You are provided with the state token to retrieve it ( allowing you to add or remove capabilities from it ) and the global handle in case you want to remove it .
pub fn new<L>(display: &mut Display, name: String, logger: L) -> (Seat, Global<wl_seat::WlSeat>)
    where
        L: Into<Option<::slog::Logger>>,
    {
        let log = crate::slog_or_fallback(logger);
        let arc = Rc::new(SeatRc {
            inner: RefCell::new(Inner {
                pointer: None,
                keyboard: None,
                known_seats: Vec::new(),
            }),
            log: log.new(slog::o!("smithay_module" => "seat_handler", "seat_name" => name.clone())),
            name,
            user_data: UserDataMap::new(),
        });
        let seat = Seat { arc: arc.clone() };
        let global = display.create_global(
            5,
            Filter::new(move |(new_seat, _version), _, _| {
                let seat = implement_seat(new_seat, arc.clone());
                let mut inner = arc.inner.borrow_mut();
                if seat.as_ref().version() >= 2 {
                    seat.name(arc.name.clone());
                }
                seat.capabilities(inner.compute_caps());
                inner.known_seats.push(seat);
            }),
        );
        (seat, global)
    }
pub fn new < L > ( display : & mut Display , name : String , logger : L ) -> ( Seat , Global < wl_seat :: WlSeat > ) where L : Into < Option < :: slog :: Logger > > , { let log = crate :: slog_or_fallback ( logger ) ; let arc = Rc :: new ( SeatRc { inner : RefCell :: new ( Inner { pointer : None , keyboard : None , known_seats : Vec :: new ( ) , } ) , log : log . new ( slog :: o ! ( " " " " " " name clone ( ) ) ) , name , user_data : UserDataMap :: new ( ) , } ) ; let seat = Seat { arc : arc . clone ( ) } ; let global = display . create_global ( 5 , Filter :: new ( move | ( new_seat , _version ) , _ , _ | { let seat = implement_seat ( new_seat , arc . clone ( ) ) ; let mut inner = arc . inner . borrow_mut ( ) ; if seat . as_ref ( ) . version ( ) >= 2 { seat . name ( arc . name . clone ( ) ) ; } seat . capabilities ( inner . compute_caps ( ) ) ; inner . known_seats . push ( seat ) ; } ) , ) ; ( seat , global ) }
Create a new seat global
A new seat global is created with given name and inserted
into this wayland display.
Create a new seat global A new seat global is created with given name and inserted into this wayland display .
display
&mut Display
name
String
logger
L
display
&mut Display
name
String
logger
L