1
0
Fork 0
forked from wry/wry

input: add a default seat

This commit is contained in:
Julian Orth 2024-03-13 14:16:26 +01:00
parent 8a73779cbd
commit 355a9eb240
10 changed files with 58 additions and 14 deletions

View file

@ -156,6 +156,7 @@ pub struct State {
pub output_transforms: RefCell<AHashMap<Rc<OutputId>, Transform>>,
pub double_click_interval_usec: Cell<u64>,
pub double_click_distance: Cell<i32>,
pub create_default_seat: Cell<bool>,
}
// impl Drop for State {
@ -924,4 +925,11 @@ impl State {
capture.send_failed();
}
}
pub fn create_seat(self: &Rc<Self>, name: &str) -> Rc<WlSeatGlobal> {
let global_name = self.globals.name();
let seat = WlSeatGlobal::new(global_name, name, self);
self.globals.add_global(self, &seat);
seat
}
}